1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 08:42:29 +01:00
Files
archived-php-src/ext/opcache/tests/preload.inc
2021-07-27 12:07:22 +02:00

75 lines
990 B
PHP

<?php
function f1() {
}
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() { }
}
trait T1 {
#[A]
public $prop;
static function foo() {
var_dump(__METHOD__);
}
}
trait T2 {
use T1;
static function bar() {
var_dump(__METHOD__);
}
}
class Y {
use T2;
}
class Z {
public $foo;
public a $bar;
}
class Z2 extends Z {}
class TraitAliasTest {
use T1 {
T1::foo as bar;
}
}
// Create reference to a property declared in an internal parent class.
class MyException extends Exception {
public function __construct($message) {
$this->message =& $message;
}
}
function get_anon() {
return new class {};
}
if (!isset($rt)) {
eval("class Foo {}");
class Bar extends Foo {}
eval("function f3() {} ");
}