3v4l.org

run code in 300+ PHP versions simultaneously
<?php class obj { } function ret_true() { return true; } function ret_false() { return false; } function ret_obj() { return new obj(); } function ret_std() { return new stdClass(); } if ($a = ret_true() == true) { var_dump('true:true'); } if ($a = ret_true() == false) { var_dump('true:false'); } if ($a = ret_false() == true) { var_dump('false:true'); } if ($a = ret_false() == false) { var_dump('false:false'); } if ($a = ret_obj() instanceof obj) { var_dump('obj:obj'); } if ($a = ret_obj() instanceof stdClass) { var_dump('obj:std'); } if ($a = ret_std() instanceof obj) { var_dump('std:obj'); } if ($a = ret_std() instanceof stdClass) { var_dump('std:std'); }
Output for git.master, git.master_jit, rfc.property-hooks
string(9) "true:true" string(11) "false:false" string(7) "obj:obj" string(7) "std:std"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
54.95 ms | 401 KiB | 8 Q