I tried to write a php extension to get function args.
<?php system('ls');?>
In this example is 'ls'.
I hooked this function with zend_set_user_opcode_handler, and the function codes are.
PHP_MINIT_FUNCTION(hello)
{
zend_set_user_opcode_handler(ZEND_DO_ICALL, do_fcall_handle);
return SUCCESS;
}
static int do_fcall_handle(ZEND_OPCODE_HANDLER_ARGS){
return ZEND_USER_OPCODE_DISPATCH;
}
The PHP version is 7.2.5.