Adding elements to Items array with PHP 5.2.0 fails

Abstract: A defect in PHP 5.2.0 causes this behavior. Use AddItems instead to resolve the issue.

VCL objects memo, listbox, combobox and RadioGroup have an Items array property. The items array may be populated in a few standard ways.

Example 1:
$this->ListBox1->Items[] = "one";
$this->ListBox1->Items[] = "two";

Example 2:
$this->ListBox1->AddItem("one");
$this->ListBox1->AddItem("two");

Example 3:
$this->ListBox1->Items[0]="zero";
$this->ListBox1->Items[1]="one";

All of these examples work with Delphi for PHP because it uses PHP 5.1.3. However, example 1 will not populate the array with PHP 5.2.0 due to a defect with this version of PHP. The solution is to either use example 2 or 3, or get a later (or earlier) version of PHP which resolves the issue.