3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public $fName = ''; function abc($test){ $this->fName = $test; } function returnVal($val) { return $this->{$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/VUke3
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/VUke3
function name:  abc
number of ops:  4
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN_OBJ                                               'fName'
          2        OP_DATA                                                  !0
    7     3      > 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/VUke3
function name:  returnVal
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~1      !0
          2      > RETURN                                                   ~1
   10     3*     > RETURN                                                   null

End of function returnval

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
203.02 ms | 997 KiB | 13 Q