Questions tagged [php-opcode]

PHP opcode is similar to Java bytecode or .Net CIL. PHP code is not interpreted directly by the Zend Engine but first compiled to opcode which is then executed.

PHP opcode is similar to Java bytecode or .NET CIL. PHP code is not interpreted directly by the Zend Engine, but it is first compiled to opcode which is then executed.

List of opcode elements.

8 questions
15
votes
2 answers
4
votes
1 answer

What is EXT_NOP and EXT_STMT, PHP Opcode

I'm trying to understand more deep and php internals by just executing native php functions against to my implementations. But in every opcode dump I see these two following opcodes : EXT_NOP :…
FZE
  • 1,587
  • 12
  • 35
4
votes
3 answers

Shorthand if then else performance/optimization in php

Talking about PHP, i would like to ask if there is a difference in performance between these two: $name=($IsBoy)?"George":"Mary"; vs if($IsBoy) { $name="George"; } else { $name="Mary"; } Will these two result to different opcode? If yes,…
Sharky
  • 6,154
  • 3
  • 39
  • 72
1
vote
1 answer

PHP opcode memory hog during include?

While optimizing a site for memory, I noticed a leap in memory consumption while including a large number of PHP class files (600+) for a specific purpose. Taking things apart I noticed that including a PHP file (and thus presumably compiling to…
Wolfgang Stengel
  • 2,867
  • 1
  • 17
  • 22
1
vote
2 answers

PHP String literals and compiler optimization

Possible Duplicate: Is there a performance benefit single quote vs double quote in php? I am wondering if PHP code takes a performance hit when using "s when defining strings containing no variables, compared to ' where the extra parsing is not…
Tyler
  • 19,113
  • 19
  • 94
  • 151
0
votes
0 answers

Try block scoping information in php byte code

Called with php…
Sim
  • 4,199
  • 4
  • 39
  • 77
0
votes
2 answers

PHP vld shows file output instead of opcode

I'm trying to use vld to view opcode of a php file prep I've installed vld with: pecl install channel://pecl.php.net/vld-0.12.0 To get familiar with VLD, I'm trying to compare to php files (echo1 and echo2) echo1.php
Paul
  • 46
  • 8
0
votes
0 answers

Invalid UTF8 characters after installing Opcache on AWS EB PHP server

I'm using CakePHP 2.4.2 to run a CMS site on Amazon Elastic Beanstalk servers with an RDS database. Starting last night I am seeing errors in my logs, and certain pages not loading (500 error) because of it: error: [PDOException] SQLSTATE[HY000]:…
James Alday
  • 873
  • 9
  • 23