Doc #65625 [Opn->Csd]: Ambiguous text

From: Date: Thu, 05 Sep 2013 21:54:07 +0000
Subject: Doc #65625 [Opn->Csd]: Ambiguous text
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10238@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65625&edit=1 ID: 65625 Updated by: aharvey@php.net Reported by: dn dot permyakov at gmail dot com Summary: Ambiguous text -Status: Open +Status: Closed Type: Documentation Problem -Package: *General Issues +Package: Documentation problem Operating System: MacOSX Mountain Lion 10.8 PHP Version: 5.5.3 -Assigned To: +Assigned To: aharvey Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2013-09-05 21:53:35] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=331299 Log: Drop the note about __isset() not being triggered on empty() — it contradicts the earlier description and, more importantly, is plain wrong. Fixes doc bug #65625 (Ambiguous text). ------------------------------------------------------------------------ [2013-09-05 19:19:18] dn dot permyakov at gmail dot com Description: ------------ --- From manual page: http://www.php.net/language.oop5.overloading --- -__isset() is triggered by calling isset() or empty() on inaccessible properties. but Note: It is not possible to use overloaded properties in other language constructs than isset(). This means if empty() is called on an overloaded property, the overloaded method is not called. I have checked - both constructions trigger __isset. So you should fix the text on this page.(My php version is last stable 5.3.25 and no notes about difference between my version and last 5.5) Test script: --------------- <?php error_reporting(E_ALL | E_STRICT); class A{ public function __isset($v) { echo "ISSET triggered!\n"; } } $var = new A; empty($var->xyz); isset($var->xyz); ?> Expected result: ---------------- ISSET triggered! Actual result: -------------- ISSET triggered! ISSET triggered! ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65625&edit=1

« previous php.doc.bugs (#10238) next »