summaryrefslogtreecommitdiff
path: root/Zend/tests/002.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/002.phpt')
-rw-r--r--Zend/tests/002.phpt31
1 files changed, 12 insertions, 19 deletions
diff --git a/Zend/tests/002.phpt b/Zend/tests/002.phpt
index b01c7fa329..1728330c08 100644
--- a/Zend/tests/002.phpt
+++ b/Zend/tests/002.phpt
@@ -23,11 +23,19 @@ function test3($a, $b) {
test1();
test1(10);
test2(1);
-test2();
+try {
+ test2();
+} catch (Throwable $e) {
+ echo "Exception: " . $e->getMessage() . "\n";
+}
test3(1,2);
call_user_func("test1");
-call_user_func("test3", 1);
+try {
+ call_user_func("test3", 1);
+} catch (Throwable $e) {
+ echo "Exception: " . $e->getMessage() . "\n";
+}
call_user_func("test3", 1, 2);
class test {
@@ -62,14 +70,7 @@ int(1)
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
bool(false)
-
-Warning: Missing argument 1 for test2(), called in %s on line %d and defined in %s on line %d
-
-Warning: func_get_arg(): Argument 0 not passed to function in %s on line %d
-bool(false)
-
-Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
-bool(false)
+Exception: Too few arguments to function test2(), 0 passed in %s002.php on line %d and exactly 1 expected
int(1)
int(2)
@@ -84,15 +85,7 @@ bool(false)
Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
bool(false)
-
-Warning: Missing argument 2 for test3()%s
-int(1)
-
-Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d
-bool(false)
-
-Warning: func_get_arg(): Argument 2 not passed to function in %s on line %d
-bool(false)
+Exception: Too few arguments to function test3(), 1 passed in %s002.php on line %d and exactly 2 expected
int(1)
int(2)