簡介:這是PHP運行機制分析(多圖)的詳細頁面,介紹了和php,有關的知識、技巧、經驗,和一些php源碼等。
class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=330429' scrolling='no'>
Introduction
Apache
Mime type handler
? AddType application/x-httpd-php .php
? AddType application/x-httpd-php-source .phps
Server context
? Override php.ini (php_value, php_flag, etc)
? Environment variables(PHP_SELF, etc)
? Create Child Process/Thread
CLI (command line interface)
CLI ≈ CGI SAPI
differences
? start up in quiet mode by default
? plain text error message(no http header)
? implicit_flush always on
? max_execution_time is set to unlimited
? others
Embed
Embed = Mini CLI
php5embed .lib
example.c
C++代碼
- #include <php_embed.h>
- int main (int argc, char *argv[]){
- PHP_EMBED_START_BLOCK(argc, argv)
- zend_eval_string(“echo ?Hello World?;”, NULL, “Embedded Code” TSRMLS_CC);
- PHP_EMBED_END_BLOCK()
- return 0;
- }
Lexer(flex)
Parser(bison)
Compiler
Opcode
C++代碼
- struct zend_op {
- opcode_handler_t handler;
- znode result;
- znode op1;
- znode op2;
- ulong extended_value;
- uint lineno;
- zend_uchar opcode;
- };
Executor
Cacher
Encoder / Decoder
Debugger
本文來源: Ben ben.yan@msn.com
“PHP運行機制分析(多圖)”的更多相關文章 》
愛J2EE關注Java邁克爾傑克遜視頻站JSON線上工具
http://biancheng.dnbcw.info/php/330429.html pageNo:11