Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34949 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43029 invoked by uid 1010); 26 Jan 2008 22:12:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43014 invoked from network); 26 Jan 2008 22:12:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jan 2008 22:12:44 -0000 Authentication-Results: pb1.pair.com header.from=lars@strojny.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lars@strojny.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain strojny.net designates 85.10.204.248 as permitted sender) X-PHP-List-Original-Sender: lars@strojny.net X-Host-Fingerprint: 85.10.204.248 milch.schokokeks.org Received: from [85.10.204.248] ([85.10.204.248:34498] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/46-08850-C50BB974 for ; Sat, 26 Jan 2008 17:12:44 -0500 Received: from [192.168.0.8] (xdsl-87-79-224-163.netcologne.de [::ffff:87.79.224.163]) (AUTH: PLAIN lars@schokokeks.org, SSL: TLSv1/SSLv3,256bits,CAMELLIA256-SHA) by milch.schokokeks.org with esmtp; Sat, 26 Jan 2008 23:12:41 +0100 id 0000000000020004.00000000479BB059.000045AB To: internals Mailing List In-Reply-To: <1201383814.6897.18.camel@johannes.nop> References: <1201367844.8418.4.camel@sams-room> <1201382016.28545.7.camel@localhost> <1201382631.6333.201.camel@blobule> <1201383814.6897.18.camel@johannes.nop> Date: Sat, 26 Jan 2008 23:12:40 +0100 Message-ID: <1201385560.28545.13.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_milch.schokokeks.org-17835-1201385561-0001-2" X-Mailer: Evolution 2.21.5 Subject: Re: [PHP-DEV] ifsetor like expression in php6 From: lars@strojny.net (Lars Strojny) --=_milch.schokokeks.org-17835-1201385561-0001-2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, Am Samstag, den 26.01.2008, 22:43 +0100 schrieb Johannes Schl=C3=BCter: [...] > ?: operator > [DOC] "expr1 ?: expr1" is a shortcut for: "expr1 > ? expr1 : expr2" as exists in gcc and discussed some time back. Note > that this is not an implementation ifsetor($var, default). While > ifsetor would not generate any message for non existing variables or > array indices the ternary shortcut does. Also the ternary shortcut does > a boolean evaluation rather then checking for isset(). That way ther > ternary shortcut can work on any expression while ifsetor can only work > on variables. Also to be silent one has do do: "@$expr1 ?: $expr2". Thanks for making this clear. That's exactly how I understood it and I didn't read before about it. That's why I guess it is intuitive :-) cu, Lars --=_milch.schokokeks.org-17835-1201385561-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: Dies ist ein digital signierter Nachrichtenteil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iQIcBAABAgAGBQJHm7BYAAoJECQPF+sCY6wH1kYP/jT2jtWg5w2X43nweUEyyqga VRHYbTN41vrGsriughx05vkm5FO9pSI7JcozzwwqfgKmbrOT1XwusLHIqdKaBJ4O l82y40jY5Fl5j9yLa5iMrSddU6o44iKNsWuQDA7ZHTlqocgk8Z1AS/HD8njvCb65 EyXQO1rYAuKOv1AS8U59cLKCYGax00653otnY+cKKkmfIxfpbS9o9Yr1TMLWsPLA jI4QIr/D8OU1vD62VOV0PU7z6ZQZl4Qhv15M7ZCrlwIsJ4lY/oV7um/vUsgpNbRV rynfXUV5/j+WJzaljXy/z/jPu5MailSoC5vTMJueN1Wz43virfjMt9xWxGcVuMwP jX5ml/ICdaZ/f4+szHVNy5R6lex++q+0+1zncZjW1KAT6c6gSfu6gvosXCsw4SMU LUaamcZ6Tym0CaWIvXQko29mkPoNjBaNVRAAKYgAmjVyoPHj6VxIRyBCpfCpze3a RlGPhxwKKL+YdAno+U0R4qOYdTrQaGO88NNVrfXV98m3q+TMIQr3FaaLQratNC3u MZzasGwEDnPPQxUxbpO3xNNJA9p6ldQvln0hd9mgzJ7vNoeDuhVRyPDPXawe198D 5yNVnCpzIjmvJITKl5NBjX/bZYC0Mph/2gj+oGZy43nkXGmdXUj0Fvzh4OUmK9Z0 vDCG93ly2W5nvLSm0W+P =YVkH -----END PGP SIGNATURE----- --=_milch.schokokeks.org-17835-1201385561-0001-2--