3v4l.org

run code in 300+ PHP versions simultaneously
<?php // This is fine. class Foo { function bar($a) {} // Untyped param. } class FooChild extends Foo { function bar(mixed $a) {} // Child declares the param as mixed. } // This is an error... class Person { public $name { set(mixed $value) { $this->name = $value; } } }
Output for rfc.property-hooks
Fatal error: Type of parameter $value of hook Person::$name::set must be compatible with property type in /in/hbCor on line 16
Process exited with code 255.

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:
129.52 ms | 1399 KiB | 8 Q