Annotation of embedaddon/php/Zend/tests/bug34199.phpt, revision 1.1.1.2

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>