3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{function __construct(){$a=array('I','n','i','t','i','a','t','i','n','g',' ','o','n','e',' ','l','i','n','e',' ','c','l','a','s','s','.','.','.','<','b','r',' ','/','>');foreach($a as $b){echo$b;}}function __destruct(){$a=array('<','b','r',' ','/','>','D','e','s','t','r','o','y','i','n','g',' ','t','h','e',' ','c','l','a','s','s','.','.','.');foreach($a as $b){echo$b;}}function testing(){$a=array('T','h','i','s',' ','i','s',' ','a','n',' ','f','u','n','c','t','i','o','n',' ','i','n',' ','t','h','e',' ','o','n','e',' ','l','i','n','e',' ','c','l','a','s','s','.','5','+','5','=','0');$c=0;$d=0;foreach($a as $b){if(is_numeric($b)){if($c==0){$c=$b;echo$b;}elseif($d==0){$d=$b;echo$b;}else{echo($c+$d);}}else{echo$b;}}}}$test=new Test();$test->testing();unset($test);
Output for git.master, git.master_jit, rfc.property-hooks
Initiating one line class...<br />This is an function in the one line class.5+5=10<br />Destroying the class...

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:
34.4 ms | 401 KiB | 8 Q