php-src/Zend/tests/magic_methods_010.phpt

16 lines
344 B
Plaintext
Raw Normal View History

--TEST--
Testing __toString() declaration with wrong modifier
--FILE--
<?php
class a {
2020-02-03 21:52:20 +00:00
static protected function __toString($a, $b) {
}
}
?>
--EXPECTF--
Warning: The magic method __toString() must have public visibility and cannot be static in %s on line %d
Fatal error: Method a::__tostring() cannot take arguments in %s on line %d