3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = new DateTimeZone( "+99:62" ); $n = $d->getName(); var_dump($d,$d->getName()); $d2 = new DateTimeZone( $n );
Output for 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
Fatal error: Uncaught DateInvalidTimeZoneException: DateTimeZone::__construct(): Timezone offset is out of range (+99:62) in /in/l7tiQ:3 Stack trace: #0 /in/l7tiQ(3): DateTimeZone->__construct('+99:62') #1 {main} thrown in /in/l7tiQ on line 3
Process exited with code 255.
Output for 8.0.26 - 8.0.30, 8.1.13 - 8.1.33, 8.2.0 - 8.2.29
Fatal error: Uncaught Exception: DateTimeZone::__construct(): Timezone offset is out of range (+99:62) in /in/l7tiQ:3 Stack trace: #0 /in/l7tiQ(3): DateTimeZone->__construct('+99:62') #1 {main} thrown in /in/l7tiQ on line 3
Process exited with code 255.
Output for 8.0.1 - 8.0.25, 8.1.0 - 8.1.12
object(DateTimeZone)#1 (2) { ["timezone_type"]=> int(1) ["timezone"]=> string(7) "+100:0" } string(7) "+100:0" Fatal error: Uncaught ValueError: DateTimeZone::__construct(): Argument #1 ($timezone) must not contain any null bytes in /in/l7tiQ:6 Stack trace: #0 /in/l7tiQ(6): DateTimeZone->__construct('+100:0\x00') #1 {main} thrown in /in/l7tiQ on line 6
Process exited with code 255.
Output for 7.4.0 - 7.4.33
object(DateTimeZone)#1 (2) { ["timezone_type"]=> int(1) ["timezone"]=> string(7) "+100:0" } string(7) "+100:0" Fatal error: Uncaught Exception: DateTimeZone::__construct(): Timezone must not contain null bytes in /in/l7tiQ:6 Stack trace: #0 /in/l7tiQ(6): DateTimeZone->__construct('+100:0\x00') #1 {main} thrown in /in/l7tiQ on line 6
Process exited with code 255.

preferences:
106.04 ms | 411 KiB | 5 Q