xref: /PHP-7.4/ext/opcache/tests/opt/sccp_014.phpt (revision 782352c5)
1--TEST--
2SCCP 014: Conditional Constant Propagation of non-escaping object properties 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 = new StdClass();
13	$entity_types->a = 1;
14	foreach ($entity_information as $info) {
15		$entity_types->a = 0;
16	}
17	var_dump((bool)($entity_types->a));
18}
19
20loadEntities(array("first", "second"));
21?>
22--EXPECT--
23bool(false)
24