sccp_015.phpt 592 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. SCCP 015: Conditional Constant Propagation of non-escaping object properties on PHI and Rewinding
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.optimization_level=-1
  7. --EXTENSIONS--
  8. opcache
  9. --FILE--
  10. <?php
  11. function 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. loadEntities(array("first", "second"));
  22. ?>
  23. --EXPECT--
  24. bool(false)
  25. bool(true)