3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php <?php $ventas_dia = array (120.25, 85.05, 90.36, 98.95, 102.51, 79.17, 89.55, 80.69, 86.77, 115.85, 124.25, 92.24, 94.97, 112.73, 127.85, 100.05, 105.42, 91.12, 99.51, 95.63 ); $total = 0; for ($i=0; $i<=count($ventas_dia)-1; $i++) { $total += $ventas_dia[$i]; } $promedio = $total / count($ventas_dia); echo 'El promedio de ventas es: ' . $promedio; ?>
Output for 7.0.0 - 7.2.3
Parse error: syntax error, unexpected '<', expecting end of file in /in/bfbor on line 2
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: syntax error, unexpected '<', expecting $end in /in/bfbor:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: syntax error, unexpected '<', expecting $end in /in/bfbor:2 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '<' in /in/bfbor on line 2
Process exited with code 255.