xref: /PHP-8.2/ext/opcache/tests/opt/sccp_013.phpt (revision e9f783fc)
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--EXTENSIONS--
8opcache
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