3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { private $p = 1; public $q = 2; } $x = new x; $y = (array) $x; print_r($y); /* Array ( [Xp] => 1 [q] => 2 ) */ $f = function() {}; print get_class($f); /// Closure var_dump((array) $f); /* Closure array(1) { [0]=> object(Closure)#2 (0) { } } */ ?>
Output for git.master_jit, git.master
Array ( [Xp] => 1 [q] => 2 ) Closurearray(1) { [0]=> object(Closure)#2 (3) { ["name"]=> string(22) "{closure:/in/4FGnj:20}" ["file"]=> string(9) "/in/4FGnj" ["line"]=> int(20) } }

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.25 ms | 861 KiB | 4 Q