3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTimeImmutable(); var_dump($date); $date2 = $date->add('+1 day'); var_dump($date); var_dump($date2);
Output for git.master
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2014-07-04 13:51:33.003431" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught TypeError: DateTimeImmutable::add(): Argument #1 ($interval) must be of type DateInterval, string given in /in/BFjVu:4 Stack trace: #0 /in/BFjVu(4): DateTimeImmutable->add('+1 day') #1 {main} thrown in /in/BFjVu on line 4
Process exited with code 255.
Output for git.master_jit
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2014-07-04 13:51:33.003736" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught TypeError: DateTimeImmutable::add(): Argument #1 ($interval) must be of type DateInterval, string given in /in/BFjVu:4 Stack trace: #0 /in/BFjVu(4): DateTimeImmutable->add('+1 day') #1 {main} thrown in /in/BFjVu on line 4
Process exited with code 255.
Output for rfc.property-hooks
object(DateTimeImmutable)#1 (3) { ["date"]=> string(26) "2014-07-04 13:51:33.003898" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught TypeError: DateTimeImmutable::add(): Argument #1 ($interval) must be of type DateInterval, string given in /in/BFjVu:4 Stack trace: #0 /in/BFjVu(4): DateTimeImmutable->add('+1 day') #1 {main} thrown in /in/BFjVu on line 4
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:
39.33 ms | 401 KiB | 8 Q