Dynamic function name in php

后端 未结 6 1031
悲&欢浪女
悲&欢浪女 2021-01-04 16:16

I would like to simplify the creation of \"Custom Post Types\" in WordPress as it is tedious to go through the same script and change all the custom post type name instances

6条回答
  •  臣服心动
    2021-01-04 17:10

    I think you could use

    runkit_function_add

    http://php.net/manual/pl/function.runkit-function-add.php

    One other available method is to use eval()

提交回复
热议问题