PHP運行機制分析(多圖)

來源:互聯網
上載者:User

簡介:這是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++代碼
  1. #include <php_embed.h>
  2. int main (int argc, char *argv[]){
  3. PHP_EMBED_START_BLOCK(argc, argv)
  4. zend_eval_string(“echo ?Hello World?;”, NULL, “Embedded Code” TSRMLS_CC);
  5. PHP_EMBED_END_BLOCK()
  6. return 0;
  7. }

Lexer(flex)

Parser(bison)

Compiler

Opcode

C++代碼
  1. struct zend_op {
  2. opcode_handler_t handler;
  3. znode result;
  4. znode op1;
  5. znode op2;
  6. ulong extended_value;
  7. uint lineno;
  8. zend_uchar opcode;
  9. };

Executor

Cacher

Encoder / Decoder

Debugger

本文來源: Ben ben.yan@msn.com

“PHP運行機制分析(多圖)”的更多相關文章 》

愛J2EE關注Java邁克爾傑克遜視頻站JSON線上工具

http://biancheng.dnbcw.info/php/330429.html pageNo:11

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.