summaryrefslogtreecommitdiff
path: root/Zend/tests/return_types/044.phpt
diff options
context:
space:
mode:
authorGabriel Caruso <carusogabriel34@gmail.com>2019-05-31 00:45:32 -0300
committerGabriel Caruso <carusogabriel34@gmail.com>2020-08-02 01:29:56 +0200
commite3d06fc79db5af5dba3f4a65bd24b3712711f1ae (patch)
tree7d87cf3b51735e17d9ddf8fede8de93c197ceaf0 /Zend/tests/return_types/044.phpt
parent650801ce4520af9d910b1d11a4951aaccf69624a (diff)
downloadphp-git-e3d06fc79db5af5dba3f4a65bd24b3712711f1ae.tar.gz
Ensure correct signatures for magic methods
Diffstat (limited to 'Zend/tests/return_types/044.phpt')
-rw-r--r--Zend/tests/return_types/044.phpt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/tests/return_types/044.phpt b/Zend/tests/return_types/044.phpt
new file mode 100644
index 0000000000..3b708a05a7
--- /dev/null
+++ b/Zend/tests/return_types/044.phpt
@@ -0,0 +1,10 @@
+--TEST--
+__set_state can only declare object as return
+--FILE--
+<?php
+class Foo {
+ public static function __set_state($properties): bool {}
+}
+?>
+--EXPECTF--
+Fatal error: Foo::__set_state(): Return type must be object when declared in %s on line %d