3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dtz = new DateTimeZone( 'Europe/Paris' ); $dt = new DateTime( 'now', $dtz ); for ( $hour = 0; $hour < 24; $hour++ ) { $dt->setTime( $hour, 0, 0 ); echo $dt->format( "H:i" ); }
Output for 5.2.0 - 7.1.0
00:0001:0002:0003:0004:0005:0006:0007:0008:0009:0010:0011:0012:0013:0014:0015:0016:0017:0018:0019:0020:0021:0022:0023:00
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTimeZone' not found in /in/YVg0I on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetimezone in /in/YVg0I on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetimezone in /in/YVg0I on line 3