3 ms·
phc is dead, so there's that :) Apart from that, it seems to be following a similar path, but is a little bit earlier down it. Could probably look at the code
by pbiggar 8y ago
phc is dead, so there's that :)
Apart from that, it seems to be following a similar path, but is a little bit earlier down it. Could probably look at the code we generated and copy some of the solutions.
PHC was also designed to support eval/dynamic features by embedding the PHP interpreter and optimizing around it. Not sure that this implementation is going down that path, which has upsides and downsides, the upside being that eval can be handled. Would be interested to see what he ends up doing.
- Twirrim 8y agoHow heavily does eval get used in PHP?
- pbiggar 8y agoMore than you'd think. I did some analysis (in 2008 mind you, long time ago, PHP4/PHP5). I think I found that half the packages on sourceforge (sourceforge!) had a use of a dynamic construct. When I looked into it, it wasn't so much eval as dynamic includes, often used for localization: $lang = "en"; include("l18n/$lang.php");
- beberlei 8y agoIt is not used alot in modern code, the only use case that I think is reasonably ok nowadays from and used that way is template engines or config caches in development mode, that usually compile template code to generated PHP files, but eval() immediately during development for simplicity.