diff options
author | Gabriel Caruso <carusogabriel34@gmail.com> | 2020-04-26 04:31:47 +0200 |
---|---|---|
committer | Gabriel Caruso <carusogabriel34@gmail.com> | 2020-04-28 17:02:03 +0200 |
commit | 34c460f32975adbe8f0f0a166ce5fbc2e1dabb4e (patch) | |
tree | 7b438793fb90cd41fabd13e14beb56ccb7d9bff5 /Zend/tests/magic_methods_set_state.phpt | |
parent | f545ee2c6cc63bae79cc5618f2019e3d9bc2dfa5 (diff) | |
download | php-git-34c460f32975adbe8f0f0a166ce5fbc2e1dabb4e.tar.gz |
Check `__set_state` structure
Fix Bug #79521.
Closes GH-5462.
Diffstat (limited to 'Zend/tests/magic_methods_set_state.phpt')
-rw-r--r-- | Zend/tests/magic_methods_set_state.phpt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Zend/tests/magic_methods_set_state.phpt b/Zend/tests/magic_methods_set_state.phpt new file mode 100644 index 0000000000..389798e542 --- /dev/null +++ b/Zend/tests/magic_methods_set_state.phpt @@ -0,0 +1,14 @@ +--TEST-- +Testing __set_state() declaration with wrong modifier +--FILE-- +<?php + +class Foo { + function __set_state() + { + } +} + +?> +--EXPECTF-- +Warning: The magic method Foo::__set_state() must be static in %s on line %d |