|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-27 00:47 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 14:00:01 2025 UTC |
Description: ------------ Then converting a text value of a boolean to an actual boolean PHP crashes after doing the conversion. If you don't convert to boolean and compare text to text it is fine. Reproduce code: --------------- <? $XML = simplexml_load_file("test.xml"); if($XML['boolean'] == "true") {echo "Attribute is the text true\n";} if($XML['boolean'] == true) {echo "Attribute is the boolean true\n";} ?> XML file contents (1 line): <test boolean="true"/> Expected result: ---------------- Attribute is the text true Attribute is the boolean true Actual result: -------------- Attribute is the text true Attribute is the boolean true But PHP crashed.