3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array ( array(1, 'Mobiel', 'Apple', '', ''), array(2, 'Mobiel', 'Apple', '', ''), array(3, 'Mobiel', 'Apple', '', ''), array(4, 'Mobiel', 'Apple', '', ''), array(5, 'Mobiel', 'Apple', '', '') ); $cars = array ('Volvo', 'BMW', 'Volkswagen') foreach ($cars as $car) { $data[0][2] = $car; } print_r ($data);
based on vuORB
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.7
Parse error: syntax error, unexpected 'foreach' (T_FOREACH) in /in/ZE3QM on line 14
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: syntax error, unexpected T_FOREACH in /in/ZE3QM:14 Stack trace: #0 {main}
Process exited with code 255.