3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dtP = new DateTimeZone('Europe/Prague'); $dtG = new DateTimeZone('GMT'); $dtU = new DateTimeZone('UTC'); var_dump($dtP, $dtG, $dtU); var_dump($dtP == $dtG, $dtP === $dtG, $dtG == $dtU, $dtG === $dtU);
Output for git.master, git.master_jit
object(DateTimeZone)#1 (2) { ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Prague" } object(DateTimeZone)#2 (2) { ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" } object(DateTimeZone)#3 (2) { ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } Warning: main(): Trying to compare different kinds of DateTimeZone objects in /in/bIJvR on line 6 Warning: main(): Trying to compare different kinds of DateTimeZone objects in /in/bIJvR on line 6 bool(false) bool(false) bool(false) bool(false)
Output for rfc.property-hooks
object(DateTimeZone)#1 (2) { ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Prague" } object(DateTimeZone)#2 (2) { ["timezone_type"]=> int(2) ["timezone"]=> string(3) "GMT" } object(DateTimeZone)#3 (2) { ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } Fatal error: Uncaught DateException: Cannot compare two different kinds of DateTimeZone objects in /in/bIJvR:6 Stack trace: #0 {main} thrown in /in/bIJvR 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:
54.76 ms | 401 KiB | 8 Q