3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<html> <head> </head> <body> <?php /* $avg=array (43, 24, 56, 76); $count=count($avg, COUNT_NORMAL); Print $count; */ function findAvg($val1,$val2,$val3,$val4){ $avg=array ($val1,$val2,$val3,$val4); $count=count($avg, COUNT_NORMAL); $average=array_sum($avg)/$count; print $average; } findAvg(43, 24, 56, 76); //findAvg($_POST[avg]); //echo $avg{2};
based on 0hMrD
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.1.0
<html> <head> </head> <body> 49.75
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/VjVT4 on line 26
Process exited with code 255.