Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10464 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27428 invoked by uid 1010); 15 Jun 2004 11:27:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 27403 invoked by uid 1007); 15 Jun 2004 11:27:47 -0000 Message-ID: <20040615112747.27402.qmail@pb1.pair.com> To: internals@lists.php.net Date: Tue, 15 Jun 2004 13:27:26 +0200 Reply-To: mike@php.net Organization: IWORKS User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 [ http://iworks.at/ ] X-Accept-Language: de-AT, de-DE, de, en-GB, en-US, en MIME-Version: 1.0 X-Enigmail-Version: 0.83.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1F7A0BE26D8830C413F418C5" X-Posted-By: 80.121.41.68 Subject: ClassHints and NULL From: mike@php.net (Michael Wallner) --------------enig1F7A0BE26D8830C413F418C5 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I wonder if it is intended behavior, that execution stops when PHP stumbles across something like the following: ===#=== function doSth(Foo $Foo) { if (!isset($Foo)) return; // ... } doSth(null); ===#=== PHP Fatal Error: Argument 1 must not be null at ... on line 2 Is there *ANY* serious reason why NULL is not allowed in place of an object? PHP will become *really* odd if this is the way it goes. People won't stick to this new feature... Also, these errors are hard to track because they refer to the line number where the function definition is, not where the actual violation was comitted. Regards, -- Michael - < mike(@)php.net > --------------enig1F7A0BE26D8830C413F418C5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (Cygwin) iD8DBQFAzt0j2pTtEijQyW0RArNtAJ9wD0TnaqHnTlrJg0RxrIYqbwsMTwCgjlpM OsA86HGm1MGHjT2a2Zn+YVU= =1jhg -----END PGP SIGNATURE----- --------------enig1F7A0BE26D8830C413F418C5--