1--TEST-- 2Testing anonymous function return as array key and accessing $GLOBALS 3--FILE-- 4<?php 5 6$test = create_function('$v', 'return $v;'); 7 8$arr = array(create_function('', 'return $GLOBALS["arr"];'), 2); 9 10var_dump($arr[$test(1)]); 11var_dump($arr[$test(0)]() == $arr); 12 13?> 14--EXPECT-- 15int(2) 16bool(true) 17