source: src/router/php7/Zend/tests/closure_use_auto_global.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 4 months ago

update php

File size: 250 bytes
Line 
1--TEST--
2Cannot use() auto-global
3--FILE--
4<?php
5
6function test() {
7    $fn = function() use($GLOBALS) {
8        var_dump($GLOBALS);
9    };
10    $fn();
11}
12test();
13
14?>
15--EXPECTF--
16Fatal error: Cannot use auto-global as lexical variable in %s on line %d
Note: See TracBrowser for help on using the repository browser.