PHP: What if I call a static method in non-static way
I'm not pro in Object Oriented Programming and I got a silly question: class test { public static function doSomething($arg) { $foo = 'I ate your ' . $arg; return $foo; } } So the correct way to call doSomething() method is to do test::doSomething('Pizza'); , Am I right? Now, what will happen if I call it like this: $test = new test; $bar = $test->doSomething('Sandwich'); I've tested it and it's working without any error or notice or etc. but is that correct to do this? user1708452 As Baba already pointed out, it results in an E_STRICT depending on your configuration. But even if that's no