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 sprintf('Dag: %s, Pris: %s \n', $day, $price); }
based on LpRLX
Output for 4.3.0 - 7.2.0
Dag: 1, Pris: 800 \nDag: 2, Pris: 1600 \nDag: 3, Pris: 2400 \nDag: 4, Pris: 3200 \nDag: 5, Pris: 4000 \nDag: 6, Pris: 4800 \nDag: 7, Pris: 5600 \nDag: 8, Pris: 6400 \nDag: 9, Pris: 7200 \nDag: 10, Pris: 8000 \nDag: 11, Pris: 8800 \nDag: 12, Pris: 9600 \nDag: 13, Pris: 10400 \nDag: 14, Pris: 11200 \nDag: 15, Pris: 12000 \nDag: 16, Pris: 12800 \nDag: 17, Pris: 13600 \nDag: 18, Pris: 14400 \nDag: 19, Pris: 15200 \nDag: 20, Pris: 16000 \n