mirror of
https://github.com/php/php-src.git
synced 2025-01-11 05:24:49 +08:00
23 lines
412 B
Plaintext
23 lines
412 B
Plaintext
|
--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==
|