Why is the following code ‘crashing’ in PHP?
$normal_array = array(); $array_of_arrayrefs = array( &$normal_array ); end( $array_of_arrayrefs )['one'] = 1; // choking on this one
The expected result is that the final code line appends $normal_array with key one having value 1 but there is no output what so ever, not even prints preceeding this code. In the real context of this scenario I use end() function to always append to the last array reference.