summaryrefslogtreecommitdiff
path: root/Zend/tests/bug67436/bug67436.phpt
blob: ade29731ae4e48fae792e3f5b13d9506c0574f47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
bug67436: Autoloader isn't called if user defined error handler is present
--INI--
error_reporting=-1
--SKIPIF--
<?php if (extension_loaded('Zend OPCache')) die('skip Opcache overrides error handler'); ?>
--FILE--
<?php

spl_autoload_register(function($classname) {
    if (in_array($classname, array('a','b','c'))) {
        require_once __DIR__ . "/{$classname}.inc";
    }
});

set_error_handler(function ($errno, $errstr, $errfile, $errline) {
    var_dump($errstr);
}, error_reporting());

a::staticTest();

$b = new b();
$b->test();
--EXPECTF--
string(%d) "The magic method b::__invoke() must have public visibility and cannot be static"
b::test()
a::test(c::TESTCONSTANT)