summaryrefslogtreecommitdiff
path: root/ext/simplexml/tests/036.phpt
blob: 24bfe60e7dc3c3c3e5a1f33e5ec3c5476d500507 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
SimpleXML: overriden count() method
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
class SXE extends SimpleXmlElement {
    public function count() {
        echo "Called Count!\n";
        return parent::count();
    }
}

$str = '<xml><c>asdf</c><c>ghjk</c></xml>';
$sxe = new SXE($str);
var_dump(count($sxe));
?>
==Done==
--EXPECT--
Called Count!
int(2)
==Done==