summaryrefslogtreecommitdiff
path: root/Examples/test-suite/php/default_args_runme.php
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/php/default_args_runme.php')
-rw-r--r--Examples/test-suite/php/default_args_runme.php17
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");