Added test

This commit is contained in:
Dmitry Stogov 2018-10-30 16:25:14 +03:00
parent 38ab7ef4cf
commit 68c4f99e23
2 changed files with 36 additions and 1 deletions

View file

@ -6,3 +6,19 @@ if (isset($rt)) {
function f2() {
}
}
interface a {
function foo();
function bar();
}
interface b {
function foo();
}
abstract class c {
function bar() { }
}
class x extends c implements a, b {
function foo() { }
}

View file

@ -0,0 +1,19 @@
--TEST--
Preloading prototypes
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
opcache.preload={PWD}/preload.inc
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
var_dump((new ReflectionMethod('x', 'foo'))->getPrototype()->class);
vaR_dump((new ReflectionMethod('x', 'bar'))->getPrototype()->class);
?>
OK
--EXPECT--
string(1) "b"
string(1) "a"
OK