Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Compiling php

Posted on 2013-06-05
5
271 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 55

Accepted Solution

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

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 17

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 7

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 109

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Start Auto-download of File when page loads? 1 20
Ahax pagination 9 32
Wordpress Query 5 25
Using toggleClass to resize Bootstrap columns 7 15
This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

809 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