3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "\nReproduction\n"; class Legacy {} $a = new Legacy; $a->foo = 'bar'; echo "\nTest with Attribute\n"; #[\AllowDynamicProperties] class TestWithAttribute {} class TestChildOne extends TestWithAttribute {} $testWithAttribute = new TestWithAttribute(); $testWithAttribute->foo = 'bar'; echo "\nTest with Attribute (child class)\n"; $testChildOne = new TestChildOne(); $testChildOne->foo = 'bar'; echo "\nTest extending stdClass\n"; class TestWithStdClass extends stdClass {} class TestChildTwo extends TestWithStdClass {} $testWithAttribute = new TestWithStdClass(); $testWithAttribute->foo = 'bar'; echo "\nTest extending stdClass (child class)\n"; $testChildOne = new TestChildTwo(); $testChildOne->foo = 'bar';
Output for git.master, git.master_jit, rfc.property-hooks
Reproduction Deprecated: Creation of dynamic property Legacy::$foo is deprecated in /in/fp9h8 on line 8 Test with Attribute Test with Attribute (child class) Test extending stdClass Test extending stdClass (child 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:
85.48 ms | 406 KiB | 5 Q