3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = function($m){ return $this->waa();} class x { function __construct($x){ var_dump(preg_replace_callback('~.~', $x, 'wazaa')); } function waa(){ return 'meukee'; } } new x($x);
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16, 7.0.0 - 7.0.1
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/t22aS on line 5
Process exited with code 255.

preferences:
160.13 ms | 1399 KiB | 25 Q