3v4l.org

run code in 300+ PHP versions simultaneously
<?php $reflection = new ReflectionClass('\DateTime'); $mutable = $reflection->newInstanceWithoutConstructor(); $immutable = \DateTimeImmutable::createFromMutable($mutable);
Output for git.master, git.master_jit
Fatal error: Uncaught Error: The DateTime object has not been correctly initialized by its constructor in /in/gg0dq:6 Stack trace: #0 /in/gg0dq(6): DateTimeImmutable::createFromMutable(Object(DateTime)) #1 {main} thrown in /in/gg0dq on line 6
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Uncaught DateObjectError: Object of type DateTime has not been correctly initialized by calling parent::__construct() in its constructor in /in/gg0dq:6 Stack trace: #0 /in/gg0dq(6): DateTimeImmutable::createFromMutable(Object(DateTime)) #1 {main} thrown in /in/gg0dq on line 6
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:
143.97 ms | 407 KiB | 5 Q