3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static $x = array(); public static function foo() { if (empty(self::$x)) { echo "initialized\n\n"; self::$x = array('ciao', 'come', 'va'); } print_r(self::$x); } } A::foo(); A::foo(); A::foo(); A::foo(); A::foo(); A::foo(); A::foo(); A::foo();
Output for git.master, git.master_jit, rfc.property-hooks
initialized Array ( [0] => ciao [1] => come [2] => va ) Array ( [0] => ciao [1] => come [2] => va ) Array ( [0] => ciao [1] => come [2] => va ) Array ( [0] => ciao [1] => come [2] => va ) Array ( [0] => ciao [1] => come [2] => va ) Array ( [0] => ciao [1] => come [2] => va ) Array ( [0] => ciao [1] => come [2] => va ) Array ( [0] => ciao [1] => come [2] => va )

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:
43.34 ms | 402 KiB | 8 Q