3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(DateTime $a = null, array $b = []) { var_dump($a, $b); }; test(new DateTime, []); test(null); test(null, null);
Output for git.master
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-29 15:22:40.003691" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } array(0) { } NULL array(0) { } Fatal error: Uncaught TypeError: test(): Argument #2 ($b) must be of type array, null given, called in /in/fe68R on line 9 and defined in /in/fe68R:3 Stack trace: #0 /in/fe68R(9): test(NULL, NULL) #1 {main} thrown in /in/fe68R on line 3
Process exited with code 255.
Output for git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-29 15:22:40.003761" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } array(0) { } NULL array(0) { } Fatal error: Uncaught TypeError: test(): Argument #2 ($b) must be of type array, null given, called in /in/fe68R on line 9 and defined in /in/fe68R:3 Stack trace: #0 /in/fe68R(9): test(NULL, NULL) #1 {main} thrown in /in/fe68R on line 3
Process exited with code 255.
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-29 15:22:40.003587" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } array(0) { } NULL array(0) { } Fatal error: Uncaught TypeError: test(): Argument #2 ($b) must be of type array, null given, called in /in/fe68R on line 9 and defined in /in/fe68R:3 Stack trace: #0 /in/fe68R(9): test(NULL, NULL) #1 {main} thrown in /in/fe68R on line 3
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:
51.68 ms | 401 KiB | 8 Q