(PHP 5 >= 5.1.0)
ArrayAccess::offsetSet — Offset to set
Assigns a value to the specified offset.
The offset to assign the value to.
The value to set.
Não há valor retornado.
Nota:
The offset parameter will be set to NULL if another value is not available, like in the following example.
<?php
$arrayaccess[] = "first value";
$arrayaccess[] = "second value";
print_r($arrayaccess);
?>O exemplo acima irá imprimir:
Array ( [0] => first value [1] => second value )