I made a tongue-in-cheek comment in another question thread calling PHP a terrible language and it got down-voted like crazy. Apparently there are lots of people here who love PHP.
So I'm genuinely curious. What am I missing? Why makes PHP a good language?
Here are my reasons for disliking it:
PHP has inconsistent naming of built-in and library functions. Predictable naming patterns are important in any design.
The PHP developers constantly deprecate built-in functions and lower-level functionality. A good example is when they deprecated pass-by-reference for functions. This created a nightmare for anyone doing, say, function callbacks.
A lack of consideration in redesign. The above deprecation eliminated the ability to, in many cases, provide default keyword values for functions. They fixed this in PHP 5, but they deprecated the pass-by-reference in PHP 4!
Poor execution of name spaces (formerly no name spaces at all). Now that name spaces exist, what do we use as the dereference character? Backslash! The character used universally for escaping, even in PHP!
( Read more... )
So I'm genuinely curious. What am I missing? Why makes PHP a good language?
Here are my reasons for disliking it:
PHP has inconsistent naming of built-in and library functions. Predictable naming patterns are important in any design.
The PHP developers constantly deprecate built-in functions and lower-level functionality. A good example is when they deprecated pass-by-reference for functions. This created a nightmare for anyone doing, say, function callbacks.
A lack of consideration in redesign. The above deprecation eliminated the ability to, in many cases, provide default keyword values for functions. They fixed this in PHP 5, but they deprecated the pass-by-reference in PHP 4!
Poor execution of name spaces (formerly no name spaces at all). Now that name spaces exist, what do we use as the dereference character? Backslash! The character used universally for escaping, even in PHP!
( Read more... )
PHP Speedy is a script that you can install on your web server to automatically speed up the download time of your web pages. Here’s an example, from a test page:
Before PHP Speedy — 14 requests that took 4.44 seconds

After PHP Speedy — 4 requests that took 1.1 seconds

PHP Speedy automatically joined together all the appropriate files and compressed them, greatly reducing the load time of the page. Let’s see what Yahoo’s Y-Slow makes of this:
Before PHP Speedy — Grade F (44)

After PHP Speedy — Grade A (96)

You can have a look at the test page for yourself:
Test page without compression
Test page with compression
Download
You can download PHP Speedy from this link: PHP Speedy 0.5.2 download
Installation — via auto-install
( Read more... )
Before PHP Speedy — 14 requests that took 4.44 seconds

After PHP Speedy — 4 requests that took 1.1 seconds

PHP Speedy automatically joined together all the appropriate files and compressed them, greatly reducing the load time of the page. Let’s see what Yahoo’s Y-Slow makes of this:
Before PHP Speedy — Grade F (44)

After PHP Speedy — Grade A (96)

You can have a look at the test page for yourself:
Test page without compression
Test page with compression
Download
You can download PHP Speedy from this link: PHP Speedy 0.5.2 download
Installation — via auto-install
( Read more... )
After reading an article some time ago entitled “40 Tips for optimizing your php Code” (and some others that are suspiciously similar), I decided to redo it, but properly this time with more accurate tips, providing references and citations for each and every one.
The result is this list of over 50 PHP optimisation tips…
Update: The list is more like 50+ PHP tips and tricks these days.
Enjoy!
( Read more... )
The result is this list of over 50 PHP optimisation tips…
Update: The list is more like 50+ PHP tips and tricks these days.
Enjoy!
( Read more... )
- —
- 15 March 2009 07:57
- leave comment




