]> granicus.if.org Git - php/commitdiff
Add test file
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 23 Mar 2020 16:13:57 +0000 (17:13 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 23 Mar 2020 16:13:57 +0000 (17:13 +0100)
Forgot the git add again...

ext/opcache/tests/exit_in_call_arg.phpt [new file with mode: 0644]

diff --git a/ext/opcache/tests/exit_in_call_arg.phpt b/ext/opcache/tests/exit_in_call_arg.phpt
new file mode 100644 (file)
index 0000000..4969780
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+exit() may occur in a call argument
+--FILE--
+<?php
+
+function test($c) {
+    if ($c) {
+        var_dump(var_dump(exit("exit\n")));
+    } else {
+        var_dump("test");
+    }
+}
+test(false);
+test(true);
+
+?>
+--EXPECT--
+string(4) "test"
+exit