PHP allows access to non-static methods using ClassName:: But Why does it throw error when accessing non-static properties using ClassName::?View other answers to this thread
Learn Something New Everyday,
Connect With The Best Developers!
From what I've read, PHP 4 didn't have the static keyword in function declarations, but still allowed you to call a method using the :: static operator. It was kept for backward compatibility reasons in PHP 5 and up and in PHP 7+ is deprecated. I started with PHP 5.4, so never encountered this quirk. To me, it seems like a bug. But it is indeed a "feature".