3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function test() { return 1; } } $array = array(1=>new Test, 2=>new Test); var_dump(end($array)->test());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CTBP2
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~3      $1, 1
          3        NEW                                              $4      'Test'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~3      $4, 2
          6        ASSIGN                                                   !0, ~3
   11     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'end'
          9        SEND_REF                                                 !0
         10        DO_ICALL                                         $7      
         11        INIT_METHOD_CALL                                         $7, 'test'
         12        DO_FCALL                                      0  $8      
         13        SEND_VAR                                                 $8
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class Test:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CTBP2
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   1
    6     1*     > RETURN                                                   null

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.3 ms | 1395 KiB | 17 Q