On Sat, 2012-06-30 at 03:53 -0700, Adi Mutu wrote:
> 
> By initialization i mean the latest point possible where I can set a
> breakpoint, but right before my scripts starts executing it's
> emalloc's or efree's.....

Does "executing" include "compilation"? Does it include creating a stack
frame etc. for the "main" routine? ...

> > but even then you will see many things you're probably not
> interested in
> 
> such as?......

Well, PHP is complex, it does quite a few things in order to run a
seemingly small script.

> > Only thing that helps is learning the code structure and digging
> through it.
> 
> Any hint/documentation to learn that?

Use the source. ;-)

A bit more seriously: No, there's no good single place to look at, there
are different blogs etc looking at specific pieces in detail, but the
best thing to do is looking at the code (the filenames in Zend/ give a
good idea what they are for ...), take a question and time and start
digging. For some things it's also good to look into xdebug, vld,
runkit, ... and see where they hook in to do their magic. And well, the
path from main() in sapi/cli/php_cli.c to execute() is not that long,
what then happens is a bit more complicated though (while then again,
once you're in, quite easy for most parts, too)

johannes



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to