Skip to content

PHP7 – Static calls to non-static methods deprecated

Last updated on December 10, 2015

Calling non-static methods as static method has been deprecated in PHP7 and my be removed in the future versions.

The below example will output:

Deprecated: Non-static method foo::bar() should not be called statically in – on line 8
I am not static!


I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face – we are here to solve your problems.

0 0 votes
Article Rating
Subscribe
Notify of
guest

2 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments