I'd like to write a File-Class, but there is already a function in PHP which is called file().
Am I allowed to name my class like the function?
<?
class file{
public function __construct(){
/* DO_STH */
}
}
$a = new file();
?>
It works without a problem (PHP 5.4). Do you know a reason for not doing it?
newhelps the interpretet for call inference.function Foo() { return new Foo; } Foo()->bar();, although now that PHP supports(new Foo())->bar()it's not as useful.