xref: /php-src/ext/opcache/tests/opt/sccp_015.phpt (revision e9f783fc)
1--TEST--
2SCCP 015: Conditional Constant Propagation of non-escaping object properties on PHI and Rewinding
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 = new StdClass();
13    $entity_types->b = 0;
14    foreach ($entity_information as $ex) {
15        var_dump((bool)$entity_types->b);
16        foreach ($entity_information as $info) {
17            $entity_types->b = 1;
18        }
19    }
20}
21
22loadEntities(array("first", "second"));
23?>
24--EXPECT--
25bool(false)
26bool(true)
27