3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo gmdate("Y-m-d\TH:i:s\Z", 0); echo "\n"; echo gmdate("Y-m-d\TH:i:s\Z", -1); echo "\n"; echo gmdate("Y-m-d\TH:i:s\Z", 'foo'); echo "\n"; echo gmdate("Y-m-d\TH:i:s\Z", 10);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
1970-01-01T00:00:00Z 1969-12-31T23:59:59Z Fatal error: Uncaught TypeError: gmdate(): Argument #2 ($timestamp) must be of type ?int, string given in /in/hHNOT:7 Stack trace: #0 /in/hHNOT(7): gmdate('Y-m-d\\TH:i:s\\Z', 'foo') #1 {main} thrown in /in/hHNOT on line 7
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
1970-01-01T00:00:00Z 1969-12-31T23:59:59Z Warning: gmdate() expects parameter 2 to be int, string given in /in/hHNOT on line 7 1970-01-01T00:00:10Z
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.6 - 7.2.33
1970-01-01T00:00:00Z 1969-12-31T23:59:59Z Warning: gmdate() expects parameter 2 to be integer, string given in /in/hHNOT on line 7 1970-01-01T00:00:10Z
Output for 5.6.0 - 5.6.24
1970-01-01T00:00:00Z 1969-12-31T23:59:59Z Warning: gmdate() expects parameter 2 to be long, string given in /in/hHNOT on line 7 1970-01-01T00:00:10Z

preferences:
105.96 ms | 1674 KiB | 4 Q