PHP 8 extensions: error: Missing arginfo for in Unknown on line 0


Example:

Warning: Missing arginfo for dump_opcodes() in Unknown on line 0

Fix

Step 1: add

ZEND_BEGIN_ARG_INFO_EX(arginfo_dump_opcodes, 0, 0, 0)
ZEND_ARG_INFO(0, filename)
ZEND_END_ARG_INFO()

Note: about ZEND_BEGIN_ARG_INFO_EX

* the first argument is the name of this arginfo block
* the second argument is always zero (reserved for future use)
* the third argument is if it returns a reference
* the fourth argument is how many arguments are required

About ZEND_ARG_INFO
* the first argument to this is if this is a reference
* the second argument to this is the name

Step 2: change

PHP_FE(dump_opcodes, NULL)

to

PHP_FE(dump_opcodes, arginfo_dump_opcodes)

Leave a Reply