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