We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38ab7ef commit 68c4f99Copy full SHA for 68c4f99
ext/opcache/tests/preload.inc
@@ -5,4 +5,20 @@ function f1() {
5
if (isset($rt)) {
6
function f2() {
7
}
8
-}
+}
9
+
10
+interface a {
11
+ function foo();
12
+ function bar();
13
14
+interface b {
15
16
17
18
+abstract class c {
19
+ function bar() { }
20
21
22
+class x extends c implements a, b {
23
+ function foo() { }
24
ext/opcache/tests/preload_002.phpt
@@ -0,0 +1,19 @@
1
+--TEST--
2
+Preloading prototypes
3
+--INI--
4
+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"
0 commit comments