2 ms·
Random guess: There will be some difference in the regex engine speed, because PCRE is very fast in common cases. But doing a single regex match is not that m
by chubot 7y ago
Random guess:
There will be some difference in the regex engine speed, because PCRE is very fast in common cases.
But doing a single regex match is not that much work, so it probably boils down to I/O.
And PHP might use extra buffering to get better throughput for the common "stream a file" scenario.
Similar question with Python being faster than C++:
https://stackoverflow.com/questions/9371238/why-is-reading-lines-from-stdin-much-slower-in-c-than-python https://stackoverflow.com/questions/9371238/why-is-reading-l...
- igouy 7y ago> And PHP might … The program source code is shown.
- TheCoelacanth 7y agoNot the source code for PHP itself, though.