3v4l.org

run code in 300+ PHP versions simultaneously
<?php class thing { private static $dodad = array(1); function t1() { $val = self::$dodad[0]; } function t2() { $dodad = self::$dodad; $val = $dodad[0]; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gGTga
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   1

Class thing:
Function t1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gGTga
function name:  t1
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_STATIC_PROP_R          unknown             ~1      'dodad'
          1        FETCH_DIM_R                                      ~2      ~1, 0
          2        ASSIGN                                                   !0, ~2
    9     3      > RETURN                                                   null

End of function t1

Function t2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gGTga
function name:  t2
number of ops:  5
compiled vars:  !0 = $dodad, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_STATIC_PROP_R          unknown             ~2      'dodad'
          1        ASSIGN                                                   !0, ~2
   13     2        FETCH_DIM_R                                      ~4      !0, 0
          3        ASSIGN                                                   !1, ~4
   14     4      > RETURN                                                   null

End of function t2

End of class thing.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.92 ms | 1393 KiB | 13 Q