PHP 6 – hopefully not the end of the road

I’ve heard plenty of positive buzz about PHP 6 in the last few weeks.  Yes, it’s coming out.  Yes, it brings quite a few improvements, including better Unicode support, better security, and more help for larger projects through namespaces.  However, I hope that it won’t be the last PHP release, since there are so many other things that need fixing.

Here is a good overview, as compared to the best programming language ever – Perl.  But this probably reminds you of a famous Euro-English joke, no?   But I do miss sigils and proper hashes.  I’d love to see better memory management when programming objects.  I’d love to see improved database interfaces with prepared statements and database abstraction layer.  I would really welcome a cleanup in function names and return values. I … I … I … I hope that PHP 6 is not the end of the road, and that PHP 7, PHP 8, and PHP 9 will follow.

MIME type of uploaded files in PHP

Today I came across something that rather puzzled me at first, seemed irresponsible and such, but was cleared later, upon reading the manual.  When uploading files in PHP, variable $_FILES stores a bunch of information about each file.  One of those stored bits is the MIME type of the file.  I was puzzled with how easy it was to trick PHP into setting a wrong MIME type.  However, documentation clearly says that:

The mime type of the file, if the browser provided this information. An example would be “image/gif”. This mime type is however not checked on the PHP side and therefore don’t take its value for granted.

Upgraded to WordPress

I have finally upgraded to this blog to WordPress A couple of security issues with XML RPC are fixed by this release. I was a bit slow, since the fixes were released for over a week now, but not to worry – my PHP installation already had all the fixes for XML RPC installed.

Slashdot is running a story on the issue. One of the comments shows an easy way of upgrading PEAR that not everyone might be familiar with:

pear clear-cache
pear upgrade XML_RPC

PHP turns 10 or new ways of starting holly wars

Slashdot has an article about PHP turning 10 years old. Scrolling through the comments for the post, it seems that Slashdot editors found a new way of starting holly wars. But instead of limiting themselves with “X vs. Y” type of holly war, they do it in “X vs. everything else” manner. Makes for some interesting reading.


There are plenty of holy wars on the web that argue about superiority of PHP over Perl and vice versa. There are many people who prefer PHP, and there are many others who prefer Perl. I am, of course, in the Perl camp. I have programmed both Perl and PHP over some time, and there is no doubt in my head that Perl is way better than PHP as a language. The only point that I like about PHP is the how mod_php works. mod_php is a PHP module for Apache web server, for those who don’t know.

Anyway, back to the subject. I came across an excellent document titled “PHP IN CONTRAST TO PERL“. It summarizes the benefits of Perl compared to PHP nicely and clearly. It also links to a number of other resources on the subject, as well as provides the summary of those resources. Really neat paper and a must read for anyone who has or will have to deal with Perl and/or PHP.