1--TEST-- 2Bug #67572 - SimpleXMLElement not parsing \n correctly 3--SKIPIF-- 4<?php 5if (!extension_loaded("simplexml")) die("skip SimpleXML not available"); 6?> 7--FILE-- 8<?php 9$foo = 'bar'; 10print "regular string ... "; 11var_dump(empty($foo)); 12 13$xml = simplexml_load_string("<xml><something>somevalue</something></xml>"); 14$xml2 = simplexml_load_string("<xml>\n<something>somevalue</something>\n</xml>"); 15 16foreach($xml as $key => $value) { 17 print "$key = $value ... "; 18 var_dump(empty($value)); 19 var_dump($value == false); 20} 21 22foreach($xml2 as $key => $value) { 23 print "$key = $value ... "; 24 var_dump(empty($value)); 25 var_dump($value == false); 26} 27?> 28--EXPECT-- 29regular string ... bool(false) 30something = somevalue ... bool(false) 31bool(false) 32something = somevalue ... bool(false) 33bool(false) 34