Hi,
With Perl it's possible to execute console commands and play with the results.
Can PHP running on a windows platform do this? Also, what's all this stuff about "compiling" PHP? - how do you compile it and what's the advantage?
Cheers
Windoze command line execution?
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
http://php.net/function.exec
it sure can
Depending on the persons' meaning of compile, there's compiling to binary executable and there's compiling to php bytecode, such as with Zend's Encoder/Optimizer. Compiling to binary executable converts the entire script to machine code. PHP bytecode still has to run through php, but will run faster because less checking (a lot simpler checking) has to be done on each command. That's what I understand anyways.
it sure can
Depending on the persons' meaning of compile, there's compiling to binary executable and there's compiling to php bytecode, such as with Zend's Encoder/Optimizer. Compiling to binary executable converts the entire script to machine code. PHP bytecode still has to run through php, but will run faster because less checking (a lot simpler checking) has to be done on each command. That's what I understand anyways.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
So are you saying that PHP can be compiled to binary much like Java or C can so that you can write programs which are not web based with it? I din't realise PHP was so diverse.... I always thought it was interpreted and nothing else.
Thanks for the exec() thing....
EDIT: Actually I can see one big advantage to binary compiling PHP scripts... If you suddenly move to a host which doesn't have PHP installed you can use binary versions in the CGI folder without the requirement for php.exe
Thanks for the exec() thing....
EDIT: Actually I can see one big advantage to binary compiling PHP scripts... If you suddenly move to a host which doesn't have PHP installed you can use binary versions in the CGI folder without the requirement for php.exe
some nice projects:
http://www.hypervisual.com/winbinder/
http://wapache.sourceforge.net/
php/java/.net languages all have the same:
they compile to an intermediate language for a virtual machine.
Those instructions are then executed by the virtual machine (compiled to machine code, usually using jit and executing the machine code.)
http://www.zend.com/store/products/zend ... erator.php
http://eaccelerator.net/HomeUk
http://www.hypervisual.com/winbinder/
http://wapache.sourceforge.net/
php/java/.net languages all have the same:
they compile to an intermediate language for a virtual machine.
Those instructions are then executed by the virtual machine (compiled to machine code, usually using jit and executing the machine code.)
http://www.zend.com/store/products/zend ... erator.php
http://eaccelerator.net/HomeUk