fork download
  1. <?php
  2.  
  3. class A {
  4. public $foo = 'foo property';
  5.  
  6. public function foo() {
  7. return 'foo method';
  8. }
  9. }
  10.  
  11. $a = new A();
  12. var_dump("get $a->foo()");
  13. var_dump("get {$a->foo()}");
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
string(18) "get foo property()"
string(14) "get foo method"