3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = ' * Time Stamp: 2012-12-03 16:36:04 * Speed: 7 km/h * Heading: 356 deg (N) * Event ID: -48 * Event Desc: .Arrived at Inbound Receiving * Event Value: -56 * Event Value Type: 0'; preg_match_all("/ ([a-z ]+):([a-z0-9:\- ]+)/i", $string,$match); $values = array_combine($match[1], $match[2]) ; echo $values['Time Stamp'] ,PHP_EOL ; echo $values['Speed'] ,PHP_EOL ; echo $values['Heading'] ,PHP_EOL ; ?>
Output for 5.0.2 - 7.1.0
2012-12-03 16:36:04 7 km 356 deg
Output for 5.0.0 - 5.0.1
2012-12-03 16:36:04 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/DLj8O on line 22 PHP_EOL 7 km Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/DLj8O on line 23 PHP_EOL 356 deg Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/DLj8O on line 24 PHP_EOL
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_combine() in /in/DLj8O on line 20
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_combine() in /in/DLj8O on line 20
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_combine() in /in/DLj8O on line 20