mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Added test
This commit is contained in:
parent
38ab7ef4cf
commit
68c4f99e23
2 changed files with 36 additions and 1 deletions
|
@ -6,3 +6,19 @@ if (isset($rt)) {
|
||||||
function f2() {
|
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() { }
|
||||||
|
}
|
||||||
|
|
19
ext/opcache/tests/preload_002.phpt
Normal file
19
ext/opcache/tests/preload_002.phpt
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue