November 2009

PHP's forward compatible version compare

Blog
PHP
Programming

Sometimes the code is forward compatible, for example when it's compatible with all future PHP5 releases, put PHP's version_compare function does not support this (Perhaps because they know that they always break compatibility with every minor release!!!). This function supports .x, for the above example it's : 5.x

It's also shared here

0
Your rating: None

Unix like smart recursive file/folder copy function for PHP

Blog
PHP

PHP's file system manipulation functions are not as complete as they should be specially when it comes to manging recursive folders. For addressing part of this issue i decided to write a smart function which can handle recursive file/folder copy easily.

As you may have noticed there are feature that i didn't have time to implement , so if you have time to extend this function please notify me as well :). It's also shared here

2.1
Your rating: None Average: 2.1 (30 votes)

Alpha support for PHP's imagecopymerge function

Blog
PHP
Programming

I've just checked PHP's issue tracker and a core developer says that this function (imagecopymerge) was never meant to support alpha channel! and they refused to commit the provided patch! so ridicules Anyway i tried rodrigo's workaround and it worked quite well, thanks rodrigo for sharing it. I came up with another idea which is much faster than his solution, (it may need a little bit more memory)

4
Your rating: None Average: 4 (5 votes)

My favorite quote in "I AM Legend" (The Movie)

Blog

He had this idea. It was kind of a virologist idea. He believed that you could cure racism and hate... literally cure it, by injecting music and love into people's lives. When he was scheduled to perform at a peace rally, a gunman came to his house and shot him down. Two days later he walked out on that stage and sang.

1.038095
Your rating: None Average: 1 (105 votes)