Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6346067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:56:50+00:00 2026-05-24T20:56:50+00:00

PHP is usually compiled to opcode by the Zend engine on execution time. To

  • 0

PHP is usually compiled to opcode by the Zend engine on execution time.

To skip the compiling every time one can use an opcode cache like APC to save the opcode in shared memory and reuse it.

Okay, now it seems that there is no solution yet for just compiling the PHP to opcode and using that. Similar to how you use Java.

But why? I am wondering about that b/c this is a quite obvious idea, so I guess there is a reason for this.

EDIT:

the core question is this:

wouldn’t make PHP-compilation make opcode-caching superfluous?

The only “reason” against it would be that you couldn’t just fix something on the live-system … which is anyway bad bad bad practice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:56:52+00:00Added an answer on May 24, 2026 at 8:56 pm

    You’ve given one reason against it.

    Another very important one is that if you separate the compile from the runtime both in terms of the time at which each occur but also in terms of the hardware where it runs, you quickly run into complex dependency problems – what happens when you try to run opcode generated by PHP 5.1 on a PHP 5.3 runtime?

    It also makes debugging of code harder – since the debugger has to map the opcode back to the source code.

    But a very important question you don’t seem to have asked let alone answered is what is the benefit of pre-generating the opcode?

    Would compiling the opcode prior to runtime have a significant benefit over caching the opcode? The difference would be un-measurably small.

    Certainly the raison d’etre for HipHop is that natively compiled PHP code runs faster than PHP with opcode caching at the expense of some functionality. But that’s something quite different.

    Do you think that having only the opcodes on the server improves the security (by obscurity)?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use php and usually structure my application into model-view-controller so its always accessed
I am a web developer and usually use PHP, JavaScript or MySQL. I have
Usually I use trim() PHP function to check, if data is not empty. Also
I know that PHP CLI is usually used because of none time limits and
I have just started using XML as I usually use php but I am
I usually use Netbeans for PHP development, but have recently had to move to
I'm working on learning to use prepared statements with mysqli in PHP and usually,
If a PHP script on the server can't create a directory, is this usually
i just create reading file feature. In general, what kind PHP class that usually
I have a page called Error.php. Variables are usually passed to it using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.