cef8fcc6e3
This is a pure PHP implementation of ArrayObject. It does't match the reference semantics of zend's implementation, but it is much easier to build this in pure PHP, so its a good first step. It is better to have it like this, than to not have it at all.
13 linhas
316 B
PHP
13 linhas
316 B
PHP
<?php
|
|
class Example {
|
|
public $property = 'prop:public';
|
|
}
|
|
$arrayobj = new ArrayObject(new Example());
|
|
$arrayobj->offsetSet(4, 'four');
|
|
$arrayobj->offsetSet('group', array('g1', 'g2'));
|
|
var_dump($arrayobj);
|
|
|
|
$arrayobj = new ArrayObject(array('zero','one'));
|
|
$arrayobj->offsetSet(null, 'last');
|
|
var_dump($arrayobj);
|