Draw the table like 6³ = 3³ + 4³ + 5³ to 100³ = 35³ + 70³ + 85³
I would make a few changes for readability:


Rename:

$p3a → $cubes
$numlist → $cubeRoots

Hard-code $tnum.  It's not going to vary anyway, since it wasn't a parameter.
Eliminate $testmax.  It's not worth the effort to save a few loop iterations.
More generous horizontal spacing.  (You use lots of newlines in your source code, but need more spaces.)


Changing $numlist from a two-level array to a 1-dimensional array results in better readability as well as a performance improvement.

$i * $i * $i is simpler and faster than pow($i, 3).

Changing the termination condition of your inner loop results in an even more dramatic performance improvement.

Overall, this completes in about 1/3 of the time of the original code:

function funcC($n) {
    $exp = '³';

    $cubes = array();
    $cubeRoots = array();

    for ($i = 0; $i &lt;= $n; $i++) {
        $j = $i * $i * $i;
        $cubes[$i] = $j;
        $cubeRoots[$j] = $i;
    }

    for ($i = 3; $i &lt;= $n; $i++) {

        for ($j = 1; $j &lt;= $i; $j++) {
            for ($k = $j; ($diff = $cubes[$i] - $cubes[$j] - $cubes[$k]) &gt;= $cubes[$k]; $k++) {
                if (isset($cubeRoots[$diff])) {
                    echo " $i$exp  =  $j$exp + $k$exp + " . $cubeRoots[$diff] . $exp . '&lt;br&gt;' . PHP_EOL;
                    break;
                }
            }
        }

    }

}