3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $pricePerDay = 800; $days = range(1,20); foreach ($days as $day) { $price = ($day * $pricePerDay); echo $price . PHP_EOL; }
based on pvUjK
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.2.0
800 1600 2400 3200 4000 4800 5600 6400 7200 8000 8800 9600 10400 11200 12000 12800 13600 14400 15200 16000
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/W2V3R on line 8 800PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 1600PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 2400PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 3200PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 4000PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 4800PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 5600PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 6400PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 7200PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 8000PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 8800PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 9600PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 10400PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 11200PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 12000PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 12800PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 13600PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 14400PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 15200PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/W2V3R on line 8 16000PHP_EOL