How does the “Array dereferencing” work on a scalar value of type boolean/integer/float/string as of PHP version 7.2.0?
I am using PHP 7.2. I come across the following note from the arrays chapter of PHP Manual Array dereferencing a scalar value which is not a string silently yields NULL , i.e. without issuing an error message. I understand how to dereference an array literal but I'm not able to understand how the "array dereferencing" works on a scalar value of type boolean/integer/float/string? If you look at the code example from the PHP manual itself, you can notice the contradiction as it's not the value of integer type is not silently yielding NULL according to the manual. <?php function getArray() {