|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-21 20:11 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
Description: ------------ Using the die() function and passing a object as a parameter, you'd expect the __toString() function to be called, but it isn't. I understand there are problems with concatenation, but in this instance, just the object is being passed. Reproduce code: --------------- <?php class Foobar { public function __toString() { return "Foo"; } } $bar = new Foobar; die($bar); ?> Expected result: ---------------- Foo Actual result: -------------- Object id #1