xref: /PHP-8.2/Zend/tests/magic_methods_008.phpt (revision 7ce8c5ad)
1--TEST--
2Testing __set implementation with wrong declaration
3--FILE--
4<?php
5
6abstract class b {
7    abstract function __set($a, $b);
8}
9
10class a extends b {
11    private function __set($a, $b) {
12    }
13}
14
15?>
16--EXPECTF--
17Warning: The magic method a::__set() must have public visibility in %s on line %d
18
19Fatal error: Access level to a::__set() must be public (as in class b) in %s on line 8
20