3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function num( $a, $b ) { if ( 0 == $b ) { return $a; } if ( $a > $b ) { $a = $a - $b; } else { $b = $b - $a; } return num( $a, $b ); } echo num( 66, 6 ) . "\n"; echo num( 24, 4 ) . "\n"; echo num( 99, 3 ) . "\n";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
6 4 3