[ Content | View menu ]

PHP Insanity VII

Mark Mzyk April 14, 2008

I discovered an interesting bit of insanity in PHP while at work the other day. Define a function in PHP and make sure it has at least one argument, but that argument should not have a default. So the function should be something like: public function foo( $bar ) Not: public function foo( $bar=fubar ) […]


PHP Insanity VI

Mark Mzyk March 21, 2008

Today’s quote comes from CoffeeGhost.net: PHP is simple to set up for web apps and easy to learn. Nearly all web hosts support it and there are many easy to install applications (like, for example, WordPress). But it has a lot of quirks and inconsistencies (too long to go into here) that it doesn’t need […]


PHP Insanity V

Mark Mzyk February 29, 2008

Today’s insanity comes from PHP’s brain dead implementation of object orientation. PHP has the concept of static functions. This is certainly good, because it means you don’t always have to instantiate an object to get access to a function. However, there is also the bad. PHP allows you to call a function statically that isn’t […]