Solved

Compiling php

Posted on 2013-06-05
5
267 Views
Last Modified: 2013-06-12
Hi,

Is it possible to compile php code. I have a single php file which I  want to compile before uploading to the web server.

ayha
0
Comment
Question by:ayha1999
5 Comments
 
LVL 51

Accepted Solution

by:
Julian Hansen earned 50 total points
ID: 39224778
0
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 50 total points
ID: 39224781
The answers are yes and no.  You can compile PHP to run on the command line of your own computer.  But compiled PHP code won't execute on a standard web server that supports PHP.  If you are trying to 'hide' your code, there are programs like IonCube that encrypt and decrypt your code to execute it.  But they are not free and must be installed as a service on the web server.  http://www.ioncube.com/  Zend Guard is another.  http://www.zend.com/en/products/guard/
0
 
LVL 16

Assisted Solution

by:Chris Harte
Chris Harte earned 50 total points
ID: 39225033
No. Php is an interpreted script not a compiled language. It needs a server to run.
0
 
LVL 6

Assisted Solution

by:Robert Saylor
Robert Saylor earned 50 total points
ID: 39225265
Is this what you are trying to do?

http://www.exeoutput.com/

I use to use something similar for Perl on stand-a-lone windows computers to gather log files and parse data.
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 50 total points
ID: 39225564
If your application is as big as Facebook, you might want to have something like HipHop.  PHP is intended to be an interpreted language, and not a compiled language. It's better to ride the horse in the direction he is going!

But that said, if you can explain why you would want compiled code instead of interpreted code, maybe we can offer some better suggestions.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now