PHP Doku:: DECLARE_INHERITED_CLASS - internals2.opcodes.declare-inherited-class.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchPHP im Kern: Das Entwicklerhandbuch für die Zend EngineZend Engine 2 opcode listOpcodesDECLARE_INHERITED_CLASS

Ein Service von Reinhard Neidl - Webprogrammierung.

Opcodes

<<DECLARE_FUNCTION

DIV>>

DECLARE_INHERITED_CLASS

PHP code

<?php
/*
 * 
 * opcode number: 140
 */
 
if($b){
 class 
Foo {
  public static 
$my_static 'foo';
  public function 
staticValue() {
    return 
self::$my_static;
  }
 }

 class 
Bar extends Foo {
  public function 
fooStatic() {
     echo 
parent::$my_static;
  }
 }
}
?>

PHP opcodes

Function name: (null)

Compiled variables: !0=$b

line#op fetchextreturn operands
60 JMPZ     !0,->5
71 ZEND_DECLARE_CLASS   $0 '%00foo%2Fmnt%2Fworkspace%2Fws_phpscripts%2FPHPopcodes%2Fphpsamples%2FDECLARE_INHERITED_CLASS.php0xb7be503b','foo'
142 ZEND_FETCH_CLASS   :1 'Foo'
 3 ZEND_DECLARE_INHERITED_CLASS   $2 '%00bar%2Fmnt%2Fworkspace%2Fws_phpscripts%2FPHPopcodes%2Fphpsamples%2FDECLARE_INHERITED_CLASS.php0xb7be50bc','bar'
194 JMP     ->5
205 RETURN     1

Function name: staticValue

Compiled variables: !0=$my_static

line#op fetchextreturn operands
100 ZEND_FETCH_CLASS      
 1 FETCH_Rstaticmember  $1 'my_static'
 2 RETURN     $1
113 RETURN     null

Function name: fooStatic

Compiled variables: !0=$my_static

line#op fetchextreturn operands
160 ZEND_FETCH_CLASS   :0  
 1 FETCH_Rstaticmember  $1 'my_static'
 2 ECHO     $1
173 RETURN     null

Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)