|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-01-19 13:48 UTC] cataphract@php.net
-Status: Open
+Status: Verified
[2013-01-19 14:58 UTC] cataphract@php.net
-Assigned To:
+Assigned To: cataphract
[2013-01-19 15:54 UTC] cataphract@php.net
[2013-01-23 12:30 UTC] cataphract@php.net
-Status: Verified
+Status: Closed
[2013-01-23 12:30 UTC] cataphract@php.net
[2013-03-01 18:32 UTC] stas@php.net
[2014-10-07 23:20 UTC] stas@php.net
[2014-10-07 23:31 UTC] stas@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 25 20:00:01 2025 UTC |
Description: ------------ When I overload the __toString() magic method in the SplFileInfo class or in one of it's derivatives it does not work if I concatenate the object with a string. See the example for a simple demonstration. Test script: --------------- class A extends \SplFileInfo { public function __toString() {return ' -expected- ';} } $a = new A('/'); // Works echo $a, $a->__toString(), $a->__toString() . ''; // Does not work - outputs parent::__toString() echo $a . ''; Expected result: ---------------- -expected- -expected- -expected- /