diff options
author | Olly Betts <olly@survex.com> | 2023-04-14 17:38:01 +1200 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2023-04-14 17:38:01 +1200 |
commit | e3b112c69ceed5c39cb07fa45a3ba62b27712679 (patch) | |
tree | c7c771a2b1d09862632facdf01ae10a05e2d61a4 /Examples/test-suite/php/default_args_runme.php | |
parent | 33f6a2d0b2c3d90b928f56ddfa599afe87903f76 (diff) | |
download | swig-e3b112c69ceed5c39cb07fa45a3ba62b27712679.tar.gz |
Remove support for PHP7
PHP7 security support ended 2022-11-28 so it doesn't make sense to
include support for it in the SWIG 4.2.x release series.
Diffstat (limited to 'Examples/test-suite/php/default_args_runme.php')
-rw-r--r-- | Examples/test-suite/php/default_args_runme.php | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/Examples/test-suite/php/default_args_runme.php b/Examples/test-suite/php/default_args_runme.php index 59350644f..31cbe0ff4 100644 --- a/Examples/test-suite/php/default_args_runme.php +++ b/Examples/test-suite/php/default_args_runme.php @@ -42,19 +42,6 @@ check::equal($f->double_if_void_ptr_is_null(6, Null), 12, "\$f->double_if_void_p check::equal($f->double_if_void_ptr_is_null(7), 14, "\$f->double_if_void_ptr_is_null(7)"); -# For the testcases below, PHP 7 emits an error, while PHP 8 throws an -# exception. To simplify the testcases we install an error handler function -# for PHP7 which throws an ArgumentCountError exception (which we have to -# define ourselves for PHP 7.0). - -if (PHP_MAJOR_VERSION == 7) { - if (PHP_MINOR_VERSION == 0) { - # ArgumentCountError was added in PHP 7.1. - class ArgumentCountError extends Error {} - } - $old_error_handler = set_error_handler(function($n,$s,$f,$l){throw preg_match('/^Wrong parameter count/', $s) ? new ArgumentCountError($s) : new Error($s);}); -} - try { $f = new Foo(1); check::fail("Foo::Foo ignore is not working"); @@ -91,10 +78,6 @@ try { } catch (Error $e) { } -if (PHP_MAJOR_VERSION == 7) { - set_error_handler($old_error_handler); -} - check::equal(Klass::inc(100, new Klass(22))->val, 122, "Klass::inc failed"); check::equal(klass::inc(100)->val, 99, "klass::inc failed"); |