[php] Avoid creating dynamic properties in testsuite

This gives a deprecation warning with PHP 8.2.
This commit is contained in:
Olly Betts 2022-09-28 18:53:04 +13:00
commit 91887a10cd
3 changed files with 6 additions and 0 deletions

View file

@ -10,6 +10,8 @@ check::classes(array('A','Foo','Bar'));
check::globals(array());
class MyBar extends Bar {
public $val;
function __construct($val = 2) {
parent::__construct();
$this->val = $val;

View file

@ -10,6 +10,8 @@ check::classes(array('director_exception','Foo','Exception1','Exception2','Base'
check::globals(array());
class MyException extends Exception {
public $msg;
function __construct($a, $b) {
$this->msg = $a . $b;
}

View file

@ -10,6 +10,8 @@ check::classes(array('A','StringVector'));
check::globals(array());
class B extends A {
public $smem;
function get_first() {
return parent::get_first() . " world!";
}