[php] Avoid creating dynamic properties in testsuite
This gives a deprecation warning with PHP 8.2.
This commit is contained in:
parent
e789c9e799
commit
91887a10cd
3 changed files with 6 additions and 0 deletions
|
|
@ -10,6 +10,8 @@ check::classes(array('A','Foo','Bar'));
|
||||||
check::globals(array());
|
check::globals(array());
|
||||||
|
|
||||||
class MyBar extends Bar {
|
class MyBar extends Bar {
|
||||||
|
public $val;
|
||||||
|
|
||||||
function __construct($val = 2) {
|
function __construct($val = 2) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->val = $val;
|
$this->val = $val;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ check::classes(array('director_exception','Foo','Exception1','Exception2','Base'
|
||||||
check::globals(array());
|
check::globals(array());
|
||||||
|
|
||||||
class MyException extends Exception {
|
class MyException extends Exception {
|
||||||
|
public $msg;
|
||||||
|
|
||||||
function __construct($a, $b) {
|
function __construct($a, $b) {
|
||||||
$this->msg = $a . $b;
|
$this->msg = $a . $b;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ check::classes(array('A','StringVector'));
|
||||||
check::globals(array());
|
check::globals(array());
|
||||||
|
|
||||||
class B extends A {
|
class B extends A {
|
||||||
|
public $smem;
|
||||||
|
|
||||||
function get_first() {
|
function get_first() {
|
||||||
return parent::get_first() . " world!";
|
return parent::get_first() . " world!";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue