call_user_func_005.phpt 692 B

1234567891011121314151617181920212223242526272829303132333435
  1. --TEST--
  2. Passing Closure as parameter to an non-existent function
  3. --FILE--
  4. <?php
  5. class foo {
  6. public static function __callstatic($x, $y) {
  7. var_dump($x,$y);
  8. return 1;
  9. }
  10. public static function teste() {
  11. return foo::x(function &($a=1,$b) { });
  12. }
  13. }
  14. var_dump(call_user_func(array('foo', 'teste')));
  15. ?>
  16. --EXPECTF--
  17. Deprecated: Optional parameter $a declared before required parameter $b is implicitly treated as a required parameter in %s on line %d
  18. string(1) "x"
  19. array(1) {
  20. [0]=>
  21. object(Closure)#%d (1) {
  22. ["parameter"]=>
  23. array(2) {
  24. ["$a"]=>
  25. string(10) "<required>"
  26. ["$b"]=>
  27. string(10) "<required>"
  28. }
  29. }
  30. }
  31. int(1)