summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/bug78230.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/opcache/tests/bug78230.phpt')
-rw-r--r--ext/opcache/tests/bug78230.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/opcache/tests/bug78230.phpt b/ext/opcache/tests/bug78230.phpt
new file mode 100644
index 0000000000..38cc684995
--- /dev/null
+++ b/ext/opcache/tests/bug78230.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #78230: Incorrect type check optimization
+--FILE--
+<?php
+
+function test($x) {
+ $y = (array) $x;
+ var_dump(is_array($y));
+}
+
+$ary = [1, 2];
+$ary[] = 3;
+test($ary);
+$ary[] = 4;
+var_dump($ary);
+
+?>
+--EXPECT--
+bool(true)
+array(4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(4)
+}