riddhi Posted January 15, 2008 Share Posted January 15, 2008 PHP 5 is compiled or is interpreted? Also after creating a .php file with eclipse do I need to build it? is there any application to build the php file? Quote Link to comment https://forums.phpfreaks.com/topic/86128-php-5-is-compiled-or-intrepreted-build/ Share on other sites More sharing options...
trq Posted January 15, 2008 Share Posted January 15, 2008 php is interpreted, doesn't matter what version your using. And no, you don't need to build php files, you just need the interpreter installed and configured. Quote Link to comment https://forums.phpfreaks.com/topic/86128-php-5-is-compiled-or-intrepreted-build/#findComment-439829 Share on other sites More sharing options...
riddhi Posted January 15, 2008 Author Share Posted January 15, 2008 I read it somewhere that they generate bytecode in php5 so does it not generate any bytecode?? even in case of interpretation Quote Link to comment https://forums.phpfreaks.com/topic/86128-php-5-is-compiled-or-intrepreted-build/#findComment-439839 Share on other sites More sharing options...
PFMaBiSmAd Posted January 15, 2008 Share Posted January 15, 2008 Here is the full story - PHP is a parsed, tokenized (bytecode), interpreted language. The parse phase produces the tokenized bytecode, which is then interpreted during the execution phase. Quote Link to comment https://forums.phpfreaks.com/topic/86128-php-5-is-compiled-or-intrepreted-build/#findComment-439873 Share on other sites More sharing options...
riddhi Posted January 16, 2008 Author Share Posted January 16, 2008 THanks thorpe and PFMaBiSmAd for those helful information. But, PFMaBiSmAd could you please elaborate on it a bit more I mean when tokenized is it not compiled?? Is there any particular site which will provide me useful input in this regard. Quote Link to comment https://forums.phpfreaks.com/topic/86128-php-5-is-compiled-or-intrepreted-build/#findComment-440686 Share on other sites More sharing options...
trq Posted January 16, 2008 Share Posted January 16, 2008 Yes it is (I suppose) compiled into opcode. However, once the script has finnished executing the bytecode is simply thrown away. The next request for the same script requires the entire process to be run again. Of course there are opcode caches available for php, and Ive heard rumours that opcode cahing will be included natively in php6. Quote Link to comment https://forums.phpfreaks.com/topic/86128-php-5-is-compiled-or-intrepreted-build/#findComment-440811 Share on other sites More sharing options...
PFMaBiSmAd Posted January 16, 2008 Share Posted January 16, 2008 Compiling generally refers to producing native machine language that is executed directly by the processor. A parsed/tokenized/interpreted language produces an intermediate list of instructions (tokens) and program data that the language engine then reads, interprets, and calls the corresponding code routine to perform the action each token corresponds to. Here is a list of the php tokens - http://www.php.net/manual/en/tokens.php Quote Link to comment https://forums.phpfreaks.com/topic/86128-php-5-is-compiled-or-intrepreted-build/#findComment-440910 Share on other sites More sharing options...
PFMaBiSmAd Posted January 16, 2008 Share Posted January 16, 2008 This might help - http://en.wikipedia.org/wiki/Bytecode Quote Link to comment https://forums.phpfreaks.com/topic/86128-php-5-is-compiled-or-intrepreted-build/#findComment-440913 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.