3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php ini_set('unserialize_callback_func','assert'); var_dump(unserialize('O:7:"phpinfo":0:{}')); define("phpinfo", "phpinfo()"); assert('true');
based on 8Ku6J
Output for 7.2.0
Warning: Cannot call assert() with string argument dynamically in /in/luVjW on line 4 Warning: unserialize(): Function assert() hasn't defined the class it was called for in /in/luVjW on line 4 object(__PHP_Incomplete_Class)#1 (1) { ["__PHP_Incomplete_Class_Name"]=> string(7) "phpinfo" } Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/luVjW on line 6
Output for 7.1.0 - 7.1.10
Warning: Cannot call assert() with string argument dynamically in /in/luVjW on line 4 Warning: unserialize(): Function assert() hasn't defined the class it was called for in /in/luVjW on line 4 object(__PHP_Incomplete_Class)#1 (1) { ["__PHP_Incomplete_Class_Name"]=> string(7) "phpinfo" }
Output for 5.3.20 - 7.0.20
Notice: Use of undefined constant phpinfo - assumed 'phpinfo' in /in/luVjW(4) : assert code on line 1 Warning: unserialize(): Function assert() hasn't defined the class it was called for in /in/luVjW on line 4 object(__PHP_Incomplete_Class)#1 (1) { ["__PHP_Incomplete_Class_Name"]=> string(7) "phpinfo" }