Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16728 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61026 invoked by uid 1010); 16 Jun 2005 13:49:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61010 invoked from network); 16 Jun 2005 13:49:31 -0000 Received: from unknown (HELO zend.com) (127.0.0.1) by localhost with SMTP; 16 Jun 2005 13:49:31 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:55276] helo=mail.zend.com) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id F4/36-20931-86381B24 for ; Thu, 16 Jun 2005 09:49:31 -0400 Received: (qmail 27344 invoked from network); 16 Jun 2005 13:49:25 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 16 Jun 2005 13:49:25 -0000 Message-ID: <5.1.0.14.2.20050616064434.039ac470@localhost> X-Sender: andi@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 16 Jun 2005 06:49:20 -0700 To: Michael Wallner ,internals@lists.php.net In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] while we're at it (PHP-5.1 & instanceof) From: andi@zend.com (Andi Gutmans) References: Seems to work... At 11:15 PM 6/15/2005 +0200, Michael Wallner wrote: >I already complained about that issue several times on IRC >and now that it's time for PHP-5.1 to come, I'll just throw >this question/rant in... > >Using is_a() throws a notice (E_STRICT IIRC) in PHP5, which >should be fine, because it was deprecated in favour of the >instanceof operator. But there's quite an ugly problem with >the instnceof operator - it needs the class to be checked >already loaded, while is_a() didn't -- *and* instanceof >let the script _die_ if there's no such class. > >To replace > is_a($obj, 'ClassName') >calls one would need to write > class_exists('ClassName') && ($obj instanceof ClassName) > >The point is, that I don't see the point why is_a() has been >deprecated (and replaced) by an operator that doesn't provide >the same functionality and can even be harmful (with fatal errors). > >Regards, >Mike > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php