Startup time in Python depends on the program because Python compiles all modules to bytecode before executing them.
Similar for the PHP version.
python3 loop.py
3.450s
time php loop.php
0.469s
So PHP is 7x faster for the longer loop.