How Do I Build My First PHP Extension in C on Linux GCC?

后端 未结 2 1233
余生分开走
余生分开走 2020-12-13 20:26

I haven\'t used C since the 1980s and 1990s with my own experimentation. I\'d like to be able to pick it up again, but this time by building small things in it and then load

2条回答
  •  别那么骄傲
    2020-12-13 20:53

    Tried Saurabh's example with PHP 7.1.6 and found some minor changes were required:

    • Change function_entry to zend_function_entry
    • Replace RETURN_STRING("Hello World", 1) with RETURN_STRING("Hello World")

    This is a great example code to start PHP extension development! Thank you!

提交回复
热议问题