summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/bug78230.phpt
blob: 38cc6849951752d9a9fbd0f878dbd4babb90796a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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)
}