diff options
author | Olly Betts <olly@survex.com> | 2022-09-28 18:53:04 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2022-09-28 18:53:04 +1300 |
commit | 91887a10cd6450b5def7a9cb4845533114c7f47b (patch) | |
tree | 58e880b1a82a42d0840f51ced158e12f8241c6af | |
parent | e789c9e79994f69b4e411aaee373bcfe8cf6d948 (diff) | |
download | swig-91887a10cd6450b5def7a9cb4845533114c7f47b.tar.gz |
[php] Avoid creating dynamic properties in testsuite
This gives a deprecation warning with PHP 8.2.
-rw-r--r-- | Examples/test-suite/php/director_detect_runme.php | 2 | ||||
-rw-r--r-- | Examples/test-suite/php/director_exception_runme.php | 2 | ||||
-rw-r--r-- | Examples/test-suite/php/director_string_runme.php | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/Examples/test-suite/php/director_detect_runme.php b/Examples/test-suite/php/director_detect_runme.php index ae92f7a0c..b9d0a6e0a 100644 --- a/Examples/test-suite/php/director_detect_runme.php +++ b/Examples/test-suite/php/director_detect_runme.php @@ -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; diff --git a/Examples/test-suite/php/director_exception_runme.php b/Examples/test-suite/php/director_exception_runme.php index a8f95997f..6f33df028 100644 --- a/Examples/test-suite/php/director_exception_runme.php +++ b/Examples/test-suite/php/director_exception_runme.php @@ -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; } diff --git a/Examples/test-suite/php/director_string_runme.php b/Examples/test-suite/php/director_string_runme.php index 3127f13fb..f146898c3 100644 --- a/Examples/test-suite/php/director_string_runme.php +++ b/Examples/test-suite/php/director_string_runme.php @@ -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!"; } |