3

There are zend_call_method_with_0_params, zend_call_method_with_1_params and zend_call_method_with_2_params in PHP extension development.

But how to call method with more than 2 params?

undur_gongor
  • 15,657
  • 5
  • 63
  • 75
Eugene Manuilov
  • 4,271
  • 8
  • 32
  • 48
  • I think you can't. You should use the get request. The url is build like this: `http://example.com/param1/param2/get_name1/get_value1/get_name2/get_value2` – noob Dec 21 '11 at 08:42
  • unfortunately I have to call `parent::__construct` method which takes 3 parameters and get request won't help, because parent class is standard Exception. – Eugene Manuilov Dec 21 '11 at 08:59

1 Answers1

4

My previous answer was wrong. You have to use zend_call_function directly. See the body of zend_call_method. Basically you have to prepare a zend_fcall_info object first. The number of arguments should be stored in the fci.param_count field and fci.params should have an array with fci.param_count elements.

Artefacto
  • 96,375
  • 17
  • 202
  • 225