3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(DateTime::createFromFormat('Y-m', '2022-13')->format(DateTime::ATOM)); var_dump(DateTime::getLastErrors());
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
string(25) "2023-01-16T12:18:17+01:00" bool(false)
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.33
string(25) "2023-01-16T12:18:17+01:00" array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(0) ["errors"]=> array(0) { } }

preferences:
81.59 ms | 408 KiB | 5 Q