3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function __toString() { return 'Test'; } } $a = array(); $b = new Test(); var_dump($a[$b]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hlUno
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'test'
    9     1        ASSIGN                                                   !0, <array>
   10     2        NEW                                              $3      'Test'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
   12     5        INIT_FCALL                                               'var_dump'
          6        FETCH_DIM_R                                      ~6      !0, !1
          7        SEND_VAL                                                 ~6
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

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

End of function __tostring

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.57 ms | 1394 KiB | 15 Q