3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function to_pace($float_pace) { $fraction = $float_pace - floor($float_pace); $minutes = $float_pace - $fraction; $seconds = round($fraction * 60, 0); return sprintf("%02d:%02d", $minutes, $seconds); } echo $to_pace(5.08);
based on 7MiGo
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: to_pace in /in/6KjV9 on line 9 Fatal error: Uncaught Error: Function name must be a string in /in/6KjV9:9 Stack trace: #0 {main} thrown in /in/6KjV9 on line 9
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Notice: Undefined variable: to_pace in /in/6KjV9 on line 9 Fatal error: Function name must be a string in /in/6KjV9 on line 9
Process exited with code 255.