SHARE
TWEET

Untitled

a guest Jul 31st, 2013 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. class A {
  3.  
  4.     public static function getStatic()
  5.     {
  6.         return function () { };
  7.     }
  8.  
  9.     public function getNoStatic()
  10.     {
  11.         return function () { };
  12.     }
  13. }
  14.  
  15. $a = new A;
  16.  
  17. $fs = A::getStatic();
  18. $fns = $a->getNoStatic();
  19.  
  20. var_dump($fs->is_static); // true
  21. var_dump($fns->is_static); // false
RAW Paste Data
Top