3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $options = json_decode('{"00:00 AM":"12:00 AM","00:30 AM":"12:30 AM","01:00 AM":"01:00 AM","01:30 AM":"01:30 AM","02:00 AM":"02:00 AM","02:30 AM":"02:30 AM","03:00 AM":"03:00 AM","03:30 AM":"03:30 AM","04:00 AM":"04:00 AM","04:30 AM":"04:30 AM","05:00 AM":"05:00 AM","05:30 AM":"05:30 AM","06:00 AM":"06:00 AM","06:30 AM":"06:30 AM","07:00 AM":"07:00 AM","07:30 AM":"07:30 AM","08:00 AM":"08:00 AM","08:30 AM":"08:30 AM","09:00 AM":"09:00 AM","09:30 AM":"09:30 AM","10:00 AM":"10:00 AM","10:30 AM":"10:30 AM","11:00 AM":"11:00 AM","11:30 AM":"11:30 AM","12:00 PM":"12:00 PM","12:30 PM":"12:30 PM","13:00 PM":"01:00 PM","13:30 PM":"01:30 PM","14:00 PM":"02:00 PM","14:30 PM":"02:30 PM","15:00 PM":"03:00 PM","15:30 PM":"03:30 PM","16:00 PM":"04:00 PM","16:30 PM":"04:30 PM","17:00 PM":"05:00 PM","17:30 PM":"05:30 PM","18:00 PM":"06:00 PM","18:30 PM":"06:30 PM","19:00 PM":"07:00 PM","19:30 PM":"07:30 PM","20:00 PM":"08:00 PM","20:30 PM":"08:30 PM","21:00 PM":"09:00 PM","21:30 PM":"09:30 PM","22:00 PM":"10:00 PM","22:30 PM":"10:30 PM","23:00 PM":"11:00 PM","23:30 PM":"11:30 PM"}', true); echo "$times = array("; foreach($options as $key => $value){ echo '"'.$key.'" => "'.$value.'", '."\n"; } echo ");";
based on lYUqc
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
Notice: Undefined variable: times in /in/lTvpX on line 5 = array("00:00 AM" => "12:00 AM", "00:30 AM" => "12:30 AM", "01:00 AM" => "01:00 AM", "01:30 AM" => "01:30 AM", "02:00 AM" => "02:00 AM", "02:30 AM" => "02:30 AM", "03:00 AM" => "03:00 AM", "03:30 AM" => "03:30 AM", "04:00 AM" => "04:00 AM", "04:30 AM" => "04:30 AM", "05:00 AM" => "05:00 AM", "05:30 AM" => "05:30 AM", "06:00 AM" => "06:00 AM", "06:30 AM" => "06:30 AM", "07:00 AM" => "07:00 AM", "07:30 AM" => "07:30 AM", "08:00 AM" => "08:00 AM", "08:30 AM" => "08:30 AM", "09:00 AM" => "09:00 AM", "09:30 AM" => "09:30 AM", "10:00 AM" => "10:00 AM", "10:30 AM" => "10:30 AM", "11:00 AM" => "11:00 AM", "11:30 AM" => "11:30 AM", "12:00 PM" => "12:00 PM", "12:30 PM" => "12:30 PM", "13:00 PM" => "01:00 PM", "13:30 PM" => "01:30 PM", "14:00 PM" => "02:00 PM", "14:30 PM" => "02:30 PM", "15:00 PM" => "03:00 PM", "15:30 PM" => "03:30 PM", "16:00 PM" => "04:00 PM", "16:30 PM" => "04:30 PM", "17:00 PM" => "05:00 PM", "17:30 PM" => "05:30 PM", "18:00 PM" => "06:00 PM", "18:30 PM" => "06:30 PM", "19:00 PM" => "07:00 PM", "19:30 PM" => "07:30 PM", "20:00 PM" => "08:00 PM", "20:30 PM" => "08:30 PM", "21:00 PM" => "09:00 PM", "21:30 PM" => "09:30 PM", "22:00 PM" => "10:00 PM", "22:30 PM" => "10:30 PM", "23:00 PM" => "11:00 PM", "23:30 PM" => "11:30 PM", );