3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(getdate(null)['year']); echo "-"; print_r(getdate()['year']); echo "-"; print_r(getdate(0)['year']);
Output for 8.0.0 - 8.0.12, 8.1rc1 - rc3
2021-2021-1970
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.25
1970-2021-1970

preferences:
31.15 ms | 460 KiB | 5 Q