Bug #70921 [Opn->Nab]: Under certain conditions, SplObjectStorage missing attribute

From: Date: Mon, 09 Oct 2017 18:05:57 +0000
Subject: Bug #70921 [Opn->Nab]: Under certain conditions, SplObjectStorage missing attribute
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211589@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70921&edit=1 ID: 70921 Updated by: nikic@php.net Reported by: b dot zhao1 at gmail dot com Summary: Under certain conditions, SplObjectStorage missing attribute -Status: Open +Status: Not a bug Type: Bug Package: SPL related Operating System: OS X 10.9.3 PHP Version: 5.5.30 Block user comment: N Private report: N New Comment: The output looks correct to me -- what's probably tripping your up is the recursion detection in print_r. If you dump the blue Value then the blue Value inside Attribute is recursive and will print *RECURSION* rather than the value. It's still there though, just not printed. Previous Comments: ------------------------------------------------------------------------ [2015-11-24 04:34:33] b dot zhao1 at gmail dot com Test Script Change To: https://bitbucket.org/billzhao/php-algorithm/raw/a651d62ec295f4b46403d91ca325ff763bf00d3c/php/1.php ------------------------------------------------------------------------ [2015-11-16 07:40:27] b dot zhao1 at gmail dot com Description: ------------ //attribute::values equals attribute->getValues() print_r($attribute); print_r($attribute->getValues()); //valuesBlue::attribute not equals valuesBlue->getValues() (missing "blue" Value Object attribute name and attribute) print_r($valueBlue); print_r($valueBlue->getAttribute()); Test script: --------------- https://bitbucket.org/billzhao/php-algorithm/raw/e445f6d26659823abfc58da21a89ff9ad3b672aa/1.php ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70921&edit=1

« previous php.bugs (#211589) next »