PHP allows to call you any method of a class both as static and as instance method. Recent version of PHP is more strict though. But still you can call non-static function as static. Calling a non-static function that uses $this statically will cause a fatal error. You’d want to catch this and throw exception […]
The post Check if a php method is called statically or as an instance method appeared first on Versatile Programmer's Diary.