daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Jul 31st, 2013 85 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top