3v4l.org

run code in 200+ 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 - 7.2.0
6 4 3