I see no advantage of turning it into an integer. because method_exists already return a boolean value. This is a long and useless coding method.
if statement requires a logical expression, and the exists method returns a boolean, the added process has the same result as using the method_exists method (but from time to time and the processor, so please do not do this: D)
source
share