3v4l.org

run code in 300+ PHP versions simultaneously
<?php $SETTINGS_nighttime_start = '22:00'; $SETTINGS_nighttime_end = '07:00'; // Töötajad ning nende tööajad $EMPLOYEES = array( '0' => array( 'name' => 'Juhan Jalgratas', 'shift_start' => '15:15', 'shift_end' => '23:45' ), '1' => array( 'name' => 'Mauno Maasikas', 'shift_start' => '10:00', 'shift_end' => '22:00' ), '2' => array( 'name' => 'Kati Kuusemets', 'shift_start' => '22:30', 'shift_end' => '08:00' ), '3' => array( 'name' => 'Pille-Mati Jämispehmut', 'shift_start' => '20:00', 'shift_end' => '10:00' ), '4' => array( 'name' => 'Käsna-Kalle Kantpüks', 'shift_start' => '09:00', 'shift_end' => '17:00' ), '5' => array( 'name' => 'Aita-Leida Kuusepuu', 'shift_start' => '23:00', 'shift_end' => '06:00' ), ); foreach($EMPLOYEES as $employee){ echo "\n",$employee['name'], $employee['shift_start'], $employee['shift_start']; } ?>
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Juhan Jalgratas15:1515:15 Mauno Maasikas10:0010:00 Kati Kuusemets22:3022:30 Pille-Mati Jämispehmut20:0020:00 Käsna-Kalle Kantpüks09:0009:00 Aita-Leida Kuusepuu23:0023:00

preferences:
280.02 ms | 406 KiB | 460 Q