fork download
  1. <?php
  2.  
  3. class User {
  4. public static function __callStatic($name, $arguments) {
  5. echo 'call ', __CLASS__, '::', $name, PHP_EOL;
  6. return __CLASS__;
  7. }
  8. }
  9. USER::take('email')::where(['id' => 1]);
  10.  
  11. class User2 {
  12. public static function take($param) {
  13. echo 'call ', __METHOD__, PHP_EOL;
  14. return __CLASS__;
  15. }
  16. public static function where($param) {
  17. echo 'call ', __METHOD__, PHP_EOL;
  18. return __CLASS__;
  19. }
  20. }
  21. USER2::take('email')::where(['id' => 1]);
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
call User::take
call User::where
call User2::take
call User2::where