Hi!

On 9/24/11 7:00 PM, Alan Knowles wrote:
Obviously I'd be keen to see this fix applied to 5.4 as the standard use
case for is_a() is mixed return testing as '$x instanceof "somestring"'
does not work.

There is no reason to do $x instanceof "somestring" as you can do just $x instanceof Class. And for 99% of cases I've seen the second argument of is_a was constant - which means this code was plain wrong, there's no reason to use is_a in such case. In case you do have to use is_a - namely, when you have variable arguments - it would be rather strange if first argument wouldn't support string as class name, but the second one would, and moreover, is_subclass_of also would.

--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to