3 ms·
Thanks. Let me rework my original question then. Why the hell didn't it always work? php > $a = "Hello"; php > echo $a[0]; H php > echo $a[0][0]; PHP
by function_seven 15y ago
Thanks. Let me rework my original question then. Why the hell didn't it always work?
php > $a = "Hello";
php > echo $a[0];
H
php > echo $a[0][0];
PHP Fatal error: Cannot use string offset as an array in php shell code on line 1
- tlack 15y agoPHP always seemed to have something weird in the parser about subscripts/array indexes. It's been there since I started using it during PHP3. Another similar fix they performed is making func()[0] work - before you had to do $tmp = func(); $tmp[0]. An old, old bug finally fixed.