Get the number of public properties in the ArrayObject.
Access
public
Returns
Type |
Description |
|---|---|
|
The number of public properties in the |
Examples
example
class Example {
public $public = 'prop:public';
private $prv = 'prop:private';
protected $prt = 'prop:protected';
}
$arrayobj = new ArrayObject(new Example());
var_dump($arrayobj->count());
$arrayobj = new ArrayObject(array('first','second','third'));
var_dump($arrayobj->count());
Result:
int(1) int(3)

