xref: /PHP-8.0/ext/opcache/tests/opt/sccp_013.phpt (revision f8d79582)
1--TEST--
2SCCP 013: Conditional Constant Propagation of non-escaping array elements on PHI
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--SKIPIF--
8<?php require_once('skipif.inc'); ?>
9--FILE--
10<?php
11function loadEntities($entity_information) {
12    $entity_types = [];
13    foreach ($entity_information as $info) {
14        $entity_types[$info] = 1;
15    }
16    var_dump((bool)($entity_types[$info]));
17}
18
19loadEntities(array("first", "second"));
20?>
21--EXPECT--
22bool(true)
23