3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { private $data = []; function abc($test){ $this->data['fName'] = $test; } function returnVal($val) { return $this->data[$val]; } } $obj = new test(); $obj->abc('data'); echo $obj->returnVal('fName');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ab1Z5
function name:  (null)
number of ops:  11
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_METHOD_CALL                                         !0, 'abc'
          4        SEND_VAL_EX                                              'data'
          5        DO_FCALL                                      0          
   14     6        INIT_METHOD_CALL                                         !0, 'returnVal'
          7        SEND_VAL_EX                                              'fName'
          8        DO_FCALL                                      0  $5      
          9        ECHO                                                     $5
         10      > RETURN                                                   1

Class test:
Function abc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ab1Z5
function name:  abc
number of ops:  5
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        FETCH_OBJ_W                                      $1      'data'
          2        ASSIGN_DIM                                               $1, 'fName'
          3        OP_DATA                                                  !0
    7     4      > RETURN                                                   null

End of function abc

Function returnval:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ab1Z5
function name:  returnVal
number of ops:  5
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~1      'data'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
   10     4*     > RETURN                                                   null

End of function returnval

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.45 ms | 997 KiB | 13 Q