3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array ( 'prd' => array ( 0 => '1', 1 => '2', 2 => '3', 3 => '4', 4 => '5', 5 => '6', 6 => '7', 7 => '8', ), 'price' => array ( 0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd', 4 => 'e', 5 => 'f', 6 => 'g', 7 => 'h', ) ); for ($x = 0; $x< count($data['prd']); $x++) { echo $data['prd'][$x] . " costs " . $data['price'][$x] . PHP_EOL; }
based on V07FZ
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.2.0
1 costs a 2 costs b 3 costs c 4 costs d 5 costs e 6 costs f 7 costs g 8 costs h
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/uCqHo on line 27 1 costs aPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/uCqHo on line 27 2 costs bPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/uCqHo on line 27 3 costs cPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/uCqHo on line 27 4 costs dPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/uCqHo on line 27 5 costs ePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/uCqHo on line 27 6 costs fPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/uCqHo on line 27 7 costs gPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/uCqHo on line 27 8 costs hPHP_EOL