3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $aa = 'str2'; function def_vars(){ $a = 'str'; $b = 2; return _R('return value',get_defined_vars()); } function _R($return,$vars){ var_dump($vars); return $return; } echo def_vars(); //var_dump(get_defined_vars());
based on dU7Gt
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.3.0rc4
array(2) { ["a"]=> string(3) "str" ["b"]=> int(2) } return value
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/ldHrL on line 15
Process exited with code 255.