TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
541 B
29 lines
541 B
--TEST--
|
|
Static Class Property Read/Write Test
|
|
--FILE--
|
|
<?php
|
|
class Select {
|
|
private $errorHandler = null;
|
|
public function setErrorHandler($errorHandler): void
|
|
{
|
|
$this->errorHandler = $errorHandler;
|
|
var_dump($this->errorHandler);
|
|
}
|
|
}
|
|
|
|
class Worker
|
|
{
|
|
public static ?stdClass $globalEvent = null;
|
|
|
|
public static function init() {
|
|
self::$globalEvent = new Select;
|
|
self::$globalEvent->setErrorHandler('test');
|
|
}
|
|
}
|
|
|
|
function main() {
|
|
Worker::init();
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
string(4) "test"
|