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.
30 lines
830 B
30 lines
830 B
<?php
|
|
|
|
class UndefineTest extends \BaseTest
|
|
{
|
|
public function testUnset()
|
|
{
|
|
$this->exec('The variable `$u1` is undefined', 'undefined-vars-01.php');
|
|
$this->exec('Unsupported unset type `Expr_FuncCall`', 'unset-01.php');
|
|
}
|
|
|
|
public function testUnsetEmptyArrayDimFetch()
|
|
{
|
|
$this->exec('Cannot use [] for array unset', 'unset-array-dim-fetch-empty.php');
|
|
}
|
|
|
|
public function testUnsetStaticProp(): void
|
|
{
|
|
$this->exec('Attempt to unset static property', 'unset-static-prop.php');
|
|
}
|
|
|
|
public function testPropertyAccessOnUndefinedVar(): void
|
|
{
|
|
$this->compile('undefined-prop-access.php');
|
|
}
|
|
|
|
public function testMethodCallOnUndefinedVar(): void
|
|
{
|
|
$this->exec('The variable `$obj` is undefined', 'undefined-method-call.php');
|
|
}
|
|
}
|
|
|