fork download
  1. <?php
  2.  
  3. class Test {
  4. private static function run($a, $b) {
  5. echo __METHOD__, $a, $b;
  6. }
  7. }
  8.  
  9. $method = new ReflectionMethod('Test', 'run');
  10. $method->setAccessible(true);
  11. $method->invoke(new Test, 123, 'baz');
Success #stdin #stdout 0.01s 24136KB
stdin
Standard input is empty
stdout
Test::run123baz