Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Compiling php

Posted on 2013-06-05
5
Medium Priority
?
275 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
[X]
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
5 Comments
 
LVL 59

Accepted Solution

by:
Julian Hansen earned 200 total points
ID: 39224778
0
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 200 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 200 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 200 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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 200 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

This article discusses how to implement server side field validation and display customized error messages to the client.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
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…
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…
Suggested Courses

604 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