1--TEST-- 2Request #38992 (invoke() and invokeArgs() static method calls should match) 3--FILE-- 4<?php 5class MyClass 6{ 7 public static function doSomething() 8 { 9 echo "Did it!\n"; 10 } 11} 12 13$r = new ReflectionMethod('MyClass', 'doSomething'); 14try { 15 $r->invoke('WTF?'); 16} catch (TypeError $e) { 17 echo $e->getMessage(), "\n"; 18} 19try { 20 $r->invokeArgs('WTF?', array()); 21} catch (TypeError $e) { 22 echo $e->getMessage(), "\n"; 23} 24?> 25--EXPECT-- 26ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, string given 27ReflectionMethod::invokeArgs(): Argument #1 ($object) must be of type ?object, string given 28