xref: /PHP-5.3/Zend/tests/bug34199.phpt (revision 610c7fbe)
1--TEST--
2Bug #34199 (if($obj)/if(!$obj) inconsistency because of cast handler)
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) print "skip SimpleXML extension required"; ?>
5--FILE--
6<?php
7$xml = "<root></root>";
8$xml = simplexml_load_string($xml);
9$kids = $xml->children();
10var_dump((bool)$kids);
11if($kids) echo "bug\n"; else echo "ok\n";
12if(!$kids) echo "ok\n"; else echo "bug\n";
13?>
14--EXPECT--
15bool(false)
16ok
17ok
18
19