inc_023.phpt 393 B

123456789101112131415161718192021222324
  1. --TEST--
  2. PRE_INC/DEC refcounted typed property
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.file_update_protection=0
  7. opcache.jit_buffer_size=1M
  8. opcache.protect_memory=1
  9. --FILE--
  10. <?php
  11. class Test {
  12. public string $prop;
  13. }
  14. $test = new Test;
  15. $test->prop = "a";
  16. ++$test->prop;
  17. --$test->prop;
  18. var_dump(++$test->prop);
  19. var_dump(--$test->prop);
  20. ?>
  21. --EXPECT--
  22. string(1) "c"
  23. string(1) "c"