|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-20 20:04 UTC] bjori@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 06:00:01 2025 UTC |
Description: ------------ If you try to compare an object to a string, the error message says that the object could not be converted to an int. It makes it a little more difficult to debug code when you're looking for a comparison involving an integer instead of a string. Nothing really major, but a would-be-nice kind of fix. Reproduce code: --------------- <?php class Foo{} $obj = new Foo(); if ($obj == "blah"){ echo "foo"; } else{ echo "bar"; } ?> Expected result: ---------------- Notice: Object of class Foo could not be converted to string in int_convert.php on line 7 Actual result: -------------- Notice: Object of class Foo could not be converted to int in int_convert.php on line 7