internals:engine

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
internals:engine [2010/04/28 12:21] – added extension globals cataphractinternals:engine [2010/05/19 17:06] – Added "How do I detect the SAPI" as explained by Johannes philip
Line 8: Line 8:
   * the pass_two() changes indexes into pointers so during execution they are accessible by: <code>opline->op1.zv</code>   * the pass_two() changes indexes into pointers so during execution they are accessible by: <code>opline->op1.zv</code>
  
 +===== Objects =====
 +See [[internals:engine:objects|here]].
  
 ===== FAQ ===== ===== FAQ =====
Line 51: Line 53:
  
 Add your random stuff here. I'll move it/update it/fix it (Derick) Add your random stuff here. I'll move it/update it/fix it (Derick)
 +
 +How do I detect the SAPI?
 +  * The fastest way [to detect CLI] would be: if (sapi_module.phpinfo_as_text) { ... }
 +  * sapi_module is a true global, not a TSRM protected one
 +  * sapi_module.name and sapi_module.pretty_name contain the name as char*
 +  * sapi_module.phpinfo_as_text is a flag which can be set by different SAPIs to request text only phpinfo() output, currently only CLI and embed do that afaik, CGI does not.
 +
  
 ==== Extension Globals ===== ==== Extension Globals =====
internals/engine.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1