3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Msg { var $x = array(); function a() { echo "CONSTRUCTOR CALLED\r\n"; } function setValue($name, $vaue) { $this->x[$name] = $value; } function getValue($name) { return $this->x[$name]; } } Msg::setValue("ERROR", 'Hello World!'); echo Msg::getValue("ERROR"); $a = new Msg(); echo $a->getValue("ERROR");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3C3KI
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                  'Msg', 'setValue'
          1        SEND_VAL                                                 'ERROR'
          2        SEND_VAL                                                 'Hello+World%21'
          3        DO_FCALL                                      0          
   19     4        INIT_STATIC_METHOD_CALL                                  'Msg', 'getValue'
          5        SEND_VAL                                                 'ERROR'
          6        DO_FCALL                                      0  $2      
          7        ECHO                                                     $2
   20     8        NEW                                              $3      'Msg'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !0, $3
   21    11        INIT_METHOD_CALL                                         !0, 'getValue'
         12        SEND_VAL_EX                                              'ERROR'
         13        DO_FCALL                                      0  $6      
         14        ECHO                                                     $6
         15      > RETURN                                                   1

Class Msg:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3C3KI
function name:  a
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'CONSTRUCTOR+CALLED%0D%0A'
    7     1      > RETURN                                                   null

End of function a

Function setvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3C3KI
function name:  setValue
number of ops:  6
compiled vars:  !0 = $name, !1 = $vaue, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        FETCH_OBJ_W                                      $3      'x'
          3        ASSIGN_DIM                                               $3, !0
          4        OP_DATA                                                  !2
   11     5      > RETURN                                                   null

End of function setvalue

Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3C3KI
function name:  getValue
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        FETCH_OBJ_R                                      ~1      'x'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
   15     4*     > RETURN                                                   null

End of function getvalue

End of class Msg.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.15 ms | 1395 KiB | 13 Q