3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $totalLitros = "10 litros"; $divida = 0; $oLitro = "1 dolar"; for ($i=1; $i <=$totalLitros; $i++) { $divida += $oLitro; } echo "Desconto: {$divida} dolares";
Output for 7.1.0 - 7.2.0
Notice: A non well formed numeric value encountered in /in/Zf0UL on line 8 Notice: A non well formed numeric value encountered in /in/Zf0UL on line 8 Notice: A non well formed numeric value encountered in /in/Zf0UL on line 8 Notice: A non well formed numeric value encountered in /in/Zf0UL on line 8 Notice: A non well formed numeric value encountered in /in/Zf0UL on line 8 Notice: A non well formed numeric value encountered in /in/Zf0UL on line 8 Notice: A non well formed numeric value encountered in /in/Zf0UL on line 8 Notice: A non well formed numeric value encountered in /in/Zf0UL on line 8 Notice: A non well formed numeric value encountered in /in/Zf0UL on line 8 Notice: A non well formed numeric value encountered in /in/Zf0UL on line 8 Desconto: 10 dolares
Output for 5.3.21 - 7.0.20
Desconto: 10 dolares