PHP/OOP Hellish Nightmare
PHP, the programming language, is not up to par and is not even worthy of consideration by any object oriented programmer.
PHP cannot do..
Static Binding
<?php
public class A extends B {
static protected $Name = "A";
}
public class B {
static protected $Name = "B";
public function Name()
{
echo self::$Name;
}
}
A.Name(); // returns B
B.Name(); // returns B
?>
Static Constructor Methods
<?php
public class A {
static function __construct()
{
}
}
?>
I wish I would have known this before I wasted a bunch of time. I installed PHP 5 thinking it fully supported all facets of object oriented classes. I know there are work arounds, but you end up losing all the benefits of object oriented programming. I am truly disappointed and I loath PHP. What a piece of shit.
Updated: I just learned C# cannot do the static binding thing either. Horrible. Bullocks.







