3v4l.org

run code in 300+ PHP versions simultaneously
<?php class XYZ{ static $mama = 1; var $papa = 1; } class ABCD extends XYZ { const girl = 2; static $boy = 3; function xyz($a) { $this->hello = self::girl + ABCD::girl + $a*2 + self::$boy + ABCD::$boy + parent::$mama; return $this->hello; } } $me = new ABCD(); echo $me->xyz(1) + $me->papa;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sOZau
function name:  (null)
number of ops:  10
compiled vars:  !0 = $me
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'ABCD'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'xyz'
          4        SEND_VAL_EX                                              1
          5        DO_FCALL                                      0  $4      
          6        FETCH_OBJ_R                                      ~5      !0, 'papa'
          7        ADD                                              ~6      $4, ~5
          8        ECHO                                                     ~6
   27     9      > RETURN                                                   1

Class XYZ: [no user functions]
Class ABCD:
Function xyz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sOZau
function name:  xyz
number of ops:  14
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        MUL                                              ~2      !0, 2
          2        ADD                                              ~3      4, ~2
          3        FETCH_STATIC_PROP_R          unknown             ~4      'boy'
          4        ADD                                              ~5      ~3, ~4
          5        FETCH_STATIC_PROP_R          unknown             ~6      'boy'
          6        ADD                                              ~7      ~5, ~6
          7        FETCH_STATIC_PROP_R          unknown             ~8      'mama'
          8        ADD                                              ~9      ~7, ~8
          9        ASSIGN_OBJ                                               'hello'
         10        OP_DATA                                                  ~9
   18    11        FETCH_OBJ_R                                      ~10     'hello'
         12      > RETURN                                                   ~10
   19    13*     > RETURN                                                   null

End of function xyz

End of class ABCD.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.39 ms | 1394 KiB | 13 Q