1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/ext/opcache/tests/opt/sccp_015.phpt
2017-09-05 11:43:33 +03:00

27 lines
579 B
PHP

--TEST--
SCCP 015: Conditional Constant Propagation of non-escaping object properties on PHI and Rewinding
--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->b = 0;
foreach ($entity_information as $ex) {
var_dump((bool)$entity_types->b);
foreach ($entity_information as $info) {
$entity_types->b = 1;
}
}
}
loadEntities(array("first", "second"));
?>
--EXPECT--
bool(false)
bool(true)