xref: /PHP-8.3/Zend/tests/arrow_functions/004.phpt (revision f3e5bbe6)
1--TEST--
2Auto-globals in arrow functions
3--FILE--
4<?php
5
6// This should work, but *not* generate a binding for $GLOBALS
7$a = 123;
8$fn = fn() => $GLOBALS['a'];
9var_dump($fn());
10
11?>
12--EXPECT--
13int(123)
14