pastebin

Paste Search Dynamic
Recent pastes
a->call()
  1. <?php
  2.  
  3. class A {
  4.         private $d;
  5.         public function __construct(callable $d) {
  6.                 $this->d = $d;
  7.         }
  8.  
  9.         public function call() {
  10.                 ($this->d)("hello");
  11.         }
  12. }
  13.  
  14. $a = new A(function($f) {
  15.         echo $f;
  16. });
  17. $a->call();
  18.  
  19. ?>
Parsed in 0.005 seconds