All pastes #376121 Raw Edit

a-l-p-h-a

public text v1 · immutable
#376121 ·published 2007-02-28 21:19 UTC
rendered paste body
<?php
// Small recursive function to test for prime factorials.
// this is quickly written in php.

function rec($int){
	for ($i = 2; $i <= $int; $i++){
		if (($int % $i) == 0){
			echo "$i<br/>\n";
			rec($int/$i);
			break;
		} elseif ($i > $int/2) {
			echo "last $int<br/>\n";
			break;
		}
	}
}

rec(1125); // where 1125 is whatever.

?>