Hi!

> The questions I have are: - Is this even possible?

Yes, should be possible but:
1. If you want precision, it would slow down your code a lot, as
basically you need to record timing of each opcode, which can be very
expensive.
2. If you're ok with less precision, you can do sampling, but in that
case you probably need your script to spend a lot of time in the same
areas of the code to have any meaningful results, otherwise it'd be just
random.

> - Are there any projects out there or being worked on that achieve
> this?

Most of the profilers afaik go by functions. Most probably because
line-level profiling would be so intrusive as to not produce really
valid results, but maybe it can be done in a way that is not that
intrusive. Stackoverflow question
http://stackoverflow.com/q/1113034/214196 has the link to some profiling
tool that seems to do line-level, but from the fact they mention PHP 4
support I'm not sure how up-to-date it is.

> - If nothing exists, I am happy to look into this however I will need
> some guidance on best practices, caveats with profiling PHP and ways
> of parsing the file correctly.

Not sure what you mean by "parsing the file correctly" - PHP engine does
the parsing, profiler shouldn't do any parsing.
-- 
Stas Malyshev
smalys...@gmail.com

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

Reply via email to