Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49901 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91962 invoked from network); 12 Oct 2010 12:53:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2010 12:53:23 -0000 Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 209.85.213.42 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:60051] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/C6-56676-24A54BC4 for ; Tue, 12 Oct 2010 08:53:22 -0400 Received: by ywi4 with SMTP id 4so1597862ywi.29 for ; Tue, 12 Oct 2010 05:53:20 -0700 (PDT) Received: by 10.150.90.42 with SMTP id n42mr8201911ybb.225.1286887999993; Tue, 12 Oct 2010 05:53:19 -0700 (PDT) Received: from pc ([83.228.56.37]) by mx.google.com with ESMTPS id v38sm3814978yba.11.2010.10.12.05.53.18 (version=SSLv3 cipher=RC4-MD5); Tue, 12 Oct 2010 05:53:19 -0700 (PDT) Message-ID: To: Date: Tue, 12 Oct 2010 15:53:08 +0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0012_01CB6A25.90EF30C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 Subject: Process failed? BC and use cases for property_exists() broken in PHP 5.3 From: sv_forums@fmethod.com ("Stan Vass") ------=_NextPart_000_0012_01CB6A25.90EF30C0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable I think this is a great case study that could lead to some improvements = in the process of fixing bugs in PHP: http://bugs.php.net/bug.php?id=3D45743 A potential bug was reported on property_exists() that it won't report = inaccessible properties in the scope. The problem is this was, in fact, the intended behavior, and despite = everything saying the function works correctly, everything around it was = changed in order to agree with the new behavior for no good reason that = I can see: 1) A test existed that specifically tested propert_exists() respects = visibility of the property from the call scope. So for this 'bugfix' to = pass tests, the *test was simply changed*.=20 2) The documentation specifically said the function respects visibility = of the property, so for this 'bugfix' to agree with documentation, the = *documentation was changed*.=20 3) The use case for this function required the existing behavior (i.e. = can you safely call property $x from the current scope with no = warning?), and that *ignored* when the behavior was changed. We already = have Reflection classes for inquiring protected/private properties of a = class from any scope. So, what happened here? Stan Vass ------=_NextPart_000_0012_01CB6A25.90EF30C0--