class_properties_static.phpt 282 B

1234567891011121314151617181920
  1. --TEST--
  2. Static Class Property Expressions
  3. --FILE--
  4. <?php
  5. class Foo {
  6. public $b1 = 1 + 1;
  7. public $b2 = 1 << 2;
  8. public $b3 = "foo " . " bar " . " baz";
  9. }
  10. $f = new Foo;
  11. var_dump(
  12. $f->b1,
  13. $f->b2,
  14. $f->b3
  15. );
  16. ?>
  17. --EXPECT--
  18. int(2)
  19. int(4)
  20. string(13) "foo bar baz"