Bug #67621 [NEW]: property_exists is broken

From: Date: Tue, 15 Jul 2014 12:10:02 +0000
Subject: Bug #67621 [NEW]: property_exists is broken
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186632@lists.php.net to get a copy of this message
From: djokodonev at gmail dot com Operating system: Ubuntu 14.04 PHP version: 5.5.14 Package: *General Issues Bug Type: Bug Bug description:property_exists is broken 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 bug report at https://bugs.php.net/bug.php?id=67621&edit=1 --

« previous php.bugs (#186632) next »