summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/opt/sccp_014.phpt
blob: 81f21a4ab062b9f7d8ff91a6735bceffdd7bf513 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
SCCP 014: Conditional Constant Propagation of non-escaping object properties on PHI
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
function loadEntities($entity_information) {
    $entity_types = new StdClass();
    $entity_types->a = 1;
    foreach ($entity_information as $info) {
        $entity_types->a = 0;
    }
    var_dump((bool)($entity_types->a));
}

loadEntities(array("first", "second"));
?>
--EXPECT--
bool(false)