xref: /php-src/Zend/tests/bug34199.phpt (revision 74859783)
1--TEST--
2Bug #34199 (if($obj)/if(!$obj) inconsistency because of cast handler)
3--EXTENSIONS--
4simplexml
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