I am considering to move frome Microsoft languages to PHP (just for web dev) which has quite an interesting syntax, a perlish look (but a wider programmer base) and it allows me to reuse the web without reinventing it. I have some concerns too. I would be more than happy to gather some wisdom from stackoverflow community, (challenge to my opinions warmly welcome). Here are my doubts about using PHP on IIS web server on windows server .
- Efficiency. Cgi are slow, what I am supposed to use? Fastcgi? Or what else?
- Efficiency + stability. Is PHP on windows really stable and a good choice in terms of performances?
- Database. I use very often MSSQL (I regret, i like it). Could I widely and efficiently interface PHP with MSSQL (using smartly stored pro, for example).
- XSLT + XML performance. I work quite a lot with XML and XSLT and I really find the MS xml parser a great software component. Are parser used in PHP fast, reliable and efficient (I am interested mainly in DOM, not SAX)?
- Objects. Is the PHP object programming model valid end efficient?
6 Regex. How efficient is PHP processing regexp?
Many thanks for your advices.
Efficiency. Cgi are slow, what I am supposed to use? Fastcgi? Or what else?
PHP runs as Apache module so there is no need for FastCGI.
Efficiency + stability. Is PHP on windows really stable and a good choice in terms of performances?
Personally i wouldn’t use PHP on Windows but my experience shows that there is no big difference to Linux & PHP
Database. I use very often MSSQL (I regret, i like it). Could I widely and efficiently interface PHP with MSSQL (using smartly stored pro, for example).
PHP can access MSSQL via ODBC or via the native MSSQL extension. You might want to look into PostgreSQL though.
XSLT + XML performance. I work quite a lot with XML and XSLT and I really find the MS xml parser a great software component. Are parser used in PHP fast, reliable and efficient (I am interested mainly in DOM, not SAX)?
No experience there, sorry.
Objects. Is the PHP object programming model valid end efficient?
Since PHP 5 (especially 5.3) Object oriented programming in PHP is acceptable. It supports everything most other languages support, inheritance, interfaces, overloading, …
Regex. How efficient is PHP processing regexp?
PHP uses the PCRE library afair so there shouldn’t be much difference to other languages.
All in all:
I’m no fan of PHP, i greatly prefer languages with strong types like C/C++/C#/Java but for a scripting language PHP made huge improvements to the PHP we knew a few years ago. If you stick to object oriented programming PHP can be a clean and good language. The main drawback is:
PHP has no object oriented base, i.e. no string class, it uses C-like functions (strchr, strstr, strlen, …), this makes OOP harder, you have to have more discipline to develop good code.