From: phpbugs at localpin dot com Operating system: PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: State that no implicit print of objects
Description: ------------ State explicitly in it's own bullet that "print $myObject" breaks in 5.2. Reproduce code: --------------- On the Backward Incompatible Changes page (http://be.php.net/manual/en/migration52.incompatible.php), it is not obvious to someone having a problem with "print $myObject" having broken that the solution lies in the section about "__toString()". I think it would be worth stating as a separate bullet point the following * "print $myObject" no longer works implicitly. You will need to define a "__toString()" method to any class which you wish to print directly. See below the section on __toString() for more details. This would save people (like me) who are looking for the answer/solution to this problem a lot of time. The problem is not noticed by people having a "__toString()" method, and so the info about "__toString()" does not initially appear relevant. The description should relate more directly to the most likely place where such a problem occurs, i.e. why the "print $myObject" has suddenly stopped working. -- Edit bug report at http://bugs.php.net/?id=41895&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41895&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41895&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41895&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41895&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41895&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41895&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41895&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41895&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41895&r=support Expected behavior: http://bugs.php.net/fix.php?id=41895&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41895&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41895&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41895&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41895&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41895&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41895&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41895&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41895&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41895&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41895&r=mysqlcfg