File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug34199.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (12 years, 8 months ago) by misho
Branches: php, MAIN
CVS tags: v5_3_10, HEAD
php

--TEST--
Bug #34199 (if($obj)/if(!$obj) inconsistency because of cast handler)
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
$xml = "<root></root>";
$xml = simplexml_load_string($xml);
$kids = $xml->children();
var_dump((bool)$kids);
if($kids) echo "bug\n"; else echo "ok\n";
if(!$kids) echo "ok\n"; else echo "bug\n";
?>
--EXPECT--
bool(false)
ok
ok


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