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.18, 8.3.0 - 8.3.6
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.28
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:
106.43 ms | 402 KiB | 121 Q