Edit report at https://bugs.php.net/bug.php?id=55132&edit=1
ID: 55132 Updated by: fel...@php.net Reported by: andre at webkr dot de Summary: String access to an expression gives parse error -Status: Open +Status: Bogus Type: Bug Package: Scripting Engine problem Operating System: Windows 7 PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The syntax (...){..} is not intended to work. Previous Comments: ------------------------------------------------------------------------ [2011-07-04 18:53:24] andre at webkr dot de Description: ------------ As documented, "accessing variables of other types [...] using [] or {} silently returns NULL". Because of this it is necessary to cast an integer to string before string access can be done. However, this results in a parse error. Test script: --------------- $i = 123; echo $i{1}; // -> empty (expected) echo ((string)$i){1}; // -> parse error ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55132&edit=1