3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class xyz { static $var; public static function setVar($value) { xyz::$var = $value; } } class one extends xyz {} class two extends xyz {} class three extends xyz {} call_user_func('one::setVar', 'first'); echo one::$var."\n"; call_user_func('two::setVar', 'second'); echo two::$var."\n"; call_user_func('three::setVar', 'third'); echo three::$var."\n";
Output for git.master, git.master_jit, rfc.property-hooks
first second third

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