Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Alan Knowles' Blog:
Removing the is_a Warning
Mar 17, 2005 @ 13:28:08

There's a quick tip from Alan Knowles today concerning the deprecation of the is_a function in PHP.

My new pet hate about PHP5 is currently the rather stupid warning: "Strict Standards: is_a(): Deprecated. Please use the instanceof operator in"

Why on earth is that in there? instance of requires that the class or interface you are testing against exists. That means loading code that may not actually be used if you are using negative testing.

He gets into the source code and shows you how to change a few values so that warning will go away...

tagged:

Link:


Trending Topics: