3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { var $arr = array("test"); function test($var) { echo "Test $var"; } } $a = new foo(); echo "<PRE>"; var_dump($a); echo "</PRE>"; $a->arr[0]("testvalue"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZI8Vl
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        ECHO                                                     '%3CPRE%3E'
          4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7        ECHO                                                     '%3C%2FPRE%3E'
   16     8        FETCH_OBJ_R                                      ~5      !0, 'arr'
          9        FETCH_DIM_R                                      ~6      ~5, 0
         10        INIT_DYNAMIC_CALL                                        ~6
         11        SEND_VAL_EX                                              'testvalue'
         12        DO_FCALL                                      0          
   18    13      > RETURN                                                   1

Class foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZI8Vl
function name:  test
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        NOP                                                      
          2        FAST_CONCAT                                      ~1      'Test+', !0
          3        ECHO                                                     ~1
   10     4      > RETURN                                                   null

End of function test

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
213.46 ms | 1395 KiB | 15 Q