3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = function($m){ return eval('$this->waa();'); }; class x { function __construct($x){ var_dump(preg_replace_callback('~.~', $x use ($this), 'wazaa')); } function waa(){ return 'meukee'; } } new x($x);
based on RkOdk
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected 'use' (T_USE), expecting ',' or ')' in /in/Wfsi9 on line 7
Process exited with code 255.
Output for 5.4.11 - 5.6.16
Parse error: syntax error, unexpected 'use' (T_USE) in /in/Wfsi9 on line 7
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_USE in /in/Wfsi9 on line 7
Process exited with code 255.