gpt4 book ai didi

php - PHP 解释器源代码中的 main() 方法在哪里?

转载 作者:可可西里 更新时间:2023-11-01 13:17:53 24 4
gpt4 key购买 nike

当我阅读 PHP source code written in C , 我找不到 main() 方法;有人可以帮助我吗?

最佳答案

PHP 中的 main() 函数是在 SAPI 中定义的,因为它们特定于 PHP 运行的模式。例如,对于命令行 SAPI,它被定义在 sapi/cli/php_cli.c ;对于 CGI/FastCGI SAPI,它在 sapi/cgi/cgi_main.c 中定义.

其他一些 SAPI,例如 apache2 SAPI,根本不定义 main() 函数,因为它们仅作为模块由单独的可执行文件加载.

关于php - PHP 解释器源代码中的 main() 方法在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17417041/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com