3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); 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/vSZi5
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
   21     3        INIT_STATIC_METHOD_CALL                                  'Msg', 'setValue'
          4        SEND_VAL                                                 'ERROR'
          5        SEND_VAL                                                 'Hello+World%21'
          6        DO_FCALL                                      0          
   22     7        INIT_STATIC_METHOD_CALL                                  'Msg', 'getValue'
          8        SEND_VAL                                                 'ERROR'
          9        DO_FCALL                                      0  $3      
         10        ECHO                                                     $3
   23    11        NEW                                              $4      'Msg'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !0, $4
   24    14        INIT_METHOD_CALL                                         !0, 'getValue'
         15        SEND_VAL_EX                                              'ERROR'
         16        DO_FCALL                                      0  $7      
         17        ECHO                                                     $7
         18      > RETURN                                                   1

Class Msg:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vSZi5
function name:  a
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'CONSTRUCTOR+CALLED%0D%0A'
   10     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/vSZi5
function name:  setValue
number of ops:  6
compiled vars:  !0 = $name, !1 = $vaue, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        FETCH_OBJ_W                                      $3      'x'
          3        ASSIGN_DIM                                               $3, !0
          4        OP_DATA                                                  !2
   14     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/vSZi5
function name:  getValue
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        FETCH_OBJ_R                                      ~1      'x'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
   18     4*     > RETURN                                                   null

End of function getvalue

End of class Msg.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.96 ms | 1405 KiB | 15 Q