3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function degree($polynomial){ for($i = (count($polynomial)-1); $i>=0; $i--){ if($polynomial[$i]!=0){ return $i; } } return 0; } ?>
Output for 4.3.0 - 7.1.0