3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new class { function __destruct() { $GLOBALS['a'] = eval('$c=`ls`;return $c. 0x1B;') . "[42m 2>&1" ; } }; $a = `2`; var_dump($a);
based on sfnZW
Output for 7.0.0 - 7.2.6
string(11) "27[42m 2>&1"
Output for hhvm-3.15.4
string(32) "Failed to exec: `ls' 27[42m 2>&1"
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/h3gie on line 3
Process exited with code 255.