- strrev: documentation ( source)
<?php
$max = 0;
$output = null;
for ($i = 100; $i < 10000; $i++ ) {
for ($j = 100; $j < 10000; $j++) {
$mul = $i*$j;
if ($mul == strrev($mul) && $mul > $max) {
$max = $mul;
}
}
}
echo "$max\n";