Bug #66173 [Ana]: Object/Array cast loses numeric property/element accessibility

From: Date: Wed, 23 Dec 2015 23:43:45 +0000
Subject: Bug #66173 [Ana]: Object/Array cast loses numeric property/element accessibility
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198188@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66173&edit=1 ID: 66173 Updated by: ajf@php.net Reported by: to dot yashin at gmail dot com -Summary: Object/Array cast looses numeric property/element accessibility +Summary: Object/Array cast loses numeric property/element accessibility Status: Analyzed Type: Bug Package: Arrays related Operating System: * PHP Version: 5.0 to master Assigned To: ajf Block user comment: N Private report: N New Comment: Corrected spelling error Previous Comments: ------------------------------------------------------------------------ [2015-12-23 23:18:27] ajf@php.net Related To: Bug #70733 ------------------------------------------------------------------------ [2015-12-19 04:08:56] ajf@php.net Related To: Bug #70692 ------------------------------------------------------------------------ [2014-01-11 01:44:53] yohgaki@php.net Array to object conversion seems to have similar issue. http://3v4l.org/vFuWT ------------------------------------------------------------------------ [2014-01-11 01:27:50] yohgaki@php.net Variable/property that has numeric name can be accessed, but object to array conversion breaks accessibility. http://3v4l.org/DY9bZ It's better to be fixed. IMO. ------------------------------------------------------------------------ [2014-01-08 02:31:36] phpmpan at mpan dot pl Maybe it should be prohibited to pass illegal names to ->{} operator? Pros: - Such names can't be accessed with -> operator anyway, so they have marginal use cases. - This bug. - Potentially bugs can arise in user code that assumes objects can't contain invalid names. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=66173 -- Edit this bug report at https://bugs.php.net/bug.php?id=66173&edit=1

« previous php.bugs (#198188) next »