So exec the included script, as is, and note the comments.
(Problem only on elements with index = characters)
You remember my un-answered questions about adding associate elements to an indexed array? You and I would not have thought of this answer, so:
in the script uncomment the upper stmt
$As[0] = 0; making the array indexed, then exec again. The errors are gone (No, I don't think this makes any sense. But is enough for another "Oh no!")
Code: Select all
// Test 0
// $As[0] = 0;
// Test 1
$As['str'] = 'XYZ';
$sav = $As['str'];
Echo "$As['str']"; // >>> not resolved
$As['str'] .= '789';
Echo "Sav / New = <crlf>$sav<crlf 2>$As['str']"; // >>> array-name as well as <crlf 2> not resolved
// Test 2
$As[2] = 'ABC';
$sav = $As[2];
Echo "$As[2]";
$As[2] .= '123';
Echo "Sav / New = <crlf>$sav<crlf 2>$As[2]"; //
// Test 3
$sav = $As['str'];
Echo "$As['str']"; // >>> not resolved
$As['str'] .= '789';
Echo "Sav / New = <crlf>$sav<crlf 2>$As['str']"; // >>> array-name as well as <crlf 2> not resolved
XYplorer Beta Club