For a web application PHP is likely much faster, because it does templating in a sane manner, while you need huge frameworks for Python.
Let's test templating in Python and PHP!
template.py:
def main():
t = 'Number {NR} is cool'
i = 10_000_000
r = 0
while i>0:
x = t.replace('{NR}', str(i))
r += len(x)
i = i - 1
print(r)
main()
template.php: <?php
$t = 'Number {NR} is cool';
$i = 10_000_000;
$r = 0;
while ($i>0) {
$x = str_replace('{NR}', $i, $t);
$r += strlen($x);
$i = $i - 1;
}
print($r);
Results: time python3 template.py
218888897
real 0m2.854s
time php template.php
218888897
real 0m0.994s
time pypy3 template.py
218888897
real 0m0.795s
So for this use case, PHP is 3x faster than CPython and PyPy is 20% faster than PHP.