Bug #67621 [Ver->Dup]: property_exists is broken

From: Date: Sun, 18 Feb 2018 08:36:15 +0000
Subject: Bug #67621 [Ver->Dup]: property_exists is broken
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214005@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67621&edit=1 ID: 67621 Updated by: jhdxr@php.net Reported by: djokodonev at gmail dot com Summary: property_exists is broken -Status: Verified +Status: Duplicate Type: Bug Package: *General Issues Operating System: Ubuntu 14.04 PHP Version: 5.5.14 Block user comment: N Private report: N New Comment: fixed in #69587 Previous Comments: ------------------------------------------------------------------------ [2015-05-06 20:15:59] cmb@php.net Related To: Bug #69587 ------------------------------------------------------------------------ [2014-07-17 22:20:18] yohgaki@php.net http://3v4l.org/S2Ijn This may be a dup. ------------------------------------------------------------------------ [2014-07-15 12:10:02] djokodonev at gmail dot com Description: ------------ property_exists functio is not working. Test script: --------------- <?php $XML = simplexml_load_string($someRawXmlString, 'SimpleXMLElement', LIBXML_NOCDATA); $data = json_decode(json_encode($XML)); $obj = $data; if (property_exists($data, 'some_property')) { } ?> The above code will not work for some weird reason. The same goes for DateTime class. <?php $datetime1 = new DateTime('2009-10-11'); $datetime2 = new DateTime('2009-10-13'); $interval = $datetime1->diff($datetime2); var_dump(property_exists($interval, 'm')) //false when the property exists; ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67621&edit=1

« previous php.bugs (#214005) next »