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 4a57b5d commit 7a20781Copy full SHA for 7a20781
ext/opcache/tests/preload.inc
@@ -22,3 +22,18 @@ abstract class c {
22
class x extends c implements a, b {
23
function foo() { }
24
}
25
+
26
+trait T1 {
27
+ static function foo() {
28
+ var_dump(__METHOD__);
29
+ }
30
+}
31
+trait T2 {
32
+ use T1;
33
+ static function bar() {
34
35
36
37
+class Y {
38
+ use T2;
39
ext/opcache/tests/preload_003.phpt
@@ -0,0 +1,19 @@
1
+--TEST--
2
+Preloading classes linked with traits
3
+--INI--
4
+opcache.enable=1
5
+opcache.enable_cli=1
6
+opcache.optimization_level=-1
7
+opcache.preload={PWD}/preload.inc
8
+--SKIPIF--
9
+<?php require_once('skipif.inc'); ?>
10
+--FILE--
11
+<?php
12
+Y::foo();
13
+Y::bar();
14
+?>
15
+OK
16
+--EXPECT--
17
+string(7) "T1::foo"
18
+string(7) "T2::bar"
19
0 commit comments