There are some functions not working properly with namespaces
<?php
namespace MyApp;
class Fruit {}
class Apple extends Fruit {}
$apple = new Apple();
$name = 'Apple';
var_dump (is_subclass_of($apple, 'Fruit'));
var_dump (is_a($apple, 'Apple'));
var_dump (new $name);
How can I make this compatible with both php 5.3 and php < 5.3 with no namespace support ? is_subclass_of and is_a are not working like this !