3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); $tz = new DateTimeZone('+24:00'); $date = new DateTime("202343-2208-153523", $tz); var_dump($date->format('Y-m-d H:i:s T')); var_export(strtotime("2023-10-04 18:31:43 UTC"));
Output for 8.1.7 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.15, 8.5.0
string(28) "2023-10-04 20:23:43 GMT-2208" 1696444303
Output for 8.3.28
/bin/php-8.3.28: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.3.28) /bin/php-8.3.28: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.3.28)
Process exited with code 1.
Output for 8.1.0 - 8.1.6
Fatal error: Uncaught Exception: Failed to parse time string (202343-2208-153523) at position 16 (2): Unexpected character in /in/HnBc7:5 Stack trace: #0 /in/HnBc7(5): DateTime->__construct('202343-2208-153...', Object(DateTimeZone)) #1 {main} thrown in /in/HnBc7 on line 5
Process exited with code 255.
Output for 8.0.1 - 8.0.30
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (202343-2208-153523) at position 16 (2): Unexpected character in /in/HnBc7:5 Stack trace: #0 /in/HnBc7(5): DateTime->__construct('202343-2208-153...', Object(DateTimeZone)) #1 {main} thrown in /in/HnBc7 on line 5
Process exited with code 255.

preferences:
135.54 ms | 410 KiB | 5 Q