3v4l.org

run code in 500+ PHP versions simultaneously
<?php abstract class TT { abstract public static function xd(); } class Test { protected const ASD = 23; private static int $field = 5; public string $foo = 'default value' { get { var_dump(debug_backtrace()); return $this->foo; } set(string $value) { var_dump(debug_backtrace()); } } public static function &getSomeProperty() { return self::$field; } } $a =& Test::getSomeProperty(); if ($a === 5) { $a = 2; } var_dump(Test::getSomeProperty()); // 2 $test = new Test();
Output for rfc.property-hooks, git.master, git.master_jit
int(2)

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:
48.98 ms | 2753 KiB | 4 Q