We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

View Complete Thread
  • PHP 7.2 on IIS extremely slooow . string concat, but everything else works great??!

    Mar 12, 2019 02:03 AM|niceblue|LINK

    Dear All ... I'm not sure where to start with this. Basically I have been running 7.2 64 bit on IIS 10, seemingly no problems.

    Most scripts seemed to be generally running fine, but there seemed to be some speed bumps which didn't make sense. I did some profiling, and found that *all* the slow down came from one place only, which is the . string concat.

    The slow down was very significant (didn't notice because for most runs where it wasn't required much). However, after doing some investigating, I found that it was at least 100x slower than using ob_start() with echo (a PHP hack ...), instead of concatenating. It cannot be that . concat is that much slower than echo and collecting the content. Other benchmarks show echo to be on 10% faster than . concat, not 10,000% faster!

    Everywhere I search, I don't see this problem from others with PHP, and generally stated . concat should perform well. However, that's not the case here. I therefore conclude it might be a peculiarity with the Windows implementation. I don't have any others to easily test.

    Every other aspect of PHP on IIS works well.

    Any help on this would be greatly appreciated!