3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array(74.6779,25.918,44.9589); $total = array_sum($arr); $total_percentage = 0; foreach($arr as $total_item) { $percentage = ($total_item*100)/$total; echo $percentage; echo "\n"; $total_percentage += $percentage; } echo $total_precentage;
based on k8VKE
Output for 5.0.4 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
51.305693800548 17.806351971903 30.887954227549 Notice: Undefined variable: total_precentage in /in/en5aD on line 15
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.0.3
51.305693800548 17.806351971903 30.887954227549 Notice: Undefined variable: total_precentage in /in/en5aD on line 15