summaryrefslogtreecommitdiff
path: root/tests/classes/tostring_004.phpt
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2020-01-13 17:06:26 +0100
committerNicolas Grekas <nicolas.grekas@gmail.com>2020-03-02 15:25:32 +0100
commit9e775db02567d3b90694ebb43f0225875a48e8c9 (patch)
treecd25ebdb5e735ca322eded189b156619a4b43534 /tests/classes/tostring_004.phpt
parentc06850b9fa1b6dc8f4f8a46d6d0ea55e8baf7cbf (diff)
downloadphp-git-9e775db02567d3b90694ebb43f0225875a48e8c9.tar.gz
Define Stringable with __toString():string method
Diffstat (limited to 'tests/classes/tostring_004.phpt')
-rw-r--r--tests/classes/tostring_004.phpt6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/classes/tostring_004.phpt b/tests/classes/tostring_004.phpt
index 987298baa5..e07a7b2121 100644
--- a/tests/classes/tostring_004.phpt
+++ b/tests/classes/tostring_004.phpt
@@ -29,7 +29,7 @@ try {
echo "\n\nObject with bad __toString():\n";
class badToString {
function __toString() {
- return 0;
+ return [];
}
}
@@ -62,8 +62,8 @@ Object of class stdClass could not be converted to string
Object with bad __toString():
Try 1:
-Method badToString::__toString() must return a string value
+Return value of badToString::__toString() must be of type string, array returned
Try 2:
-Method badToString::__toString() must return a string value
+Return value of badToString::__toString() must be of type string, array returned