3v4l.org

run code in 300+ PHP versions simultaneously
<?php class thing { private static $dodad = array(1, 2); function t1() { $val1 = self::$dodad[0]; $val2 = self::$dodad[1]; } function t2() { $dodad = self::$dodad; $val1 = $dodad[0]; $val2 = $dodad[1]; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tcK8o
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     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/tcK8o
function name:  t1
number of ops:  7
compiled vars:  !0 = $val1, !1 = $val2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_STATIC_PROP_R          unknown             ~2      'dodad'
          1        FETCH_DIM_R                                      ~3      ~2, 0
          2        ASSIGN                                                   !0, ~3
    9     3        FETCH_STATIC_PROP_R          unknown             ~5      'dodad'
          4        FETCH_DIM_R                                      ~6      ~5, 1
          5        ASSIGN                                                   !1, ~6
   10     6      > 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/tcK8o
function name:  t2
number of ops:  7
compiled vars:  !0 = $dodad, !1 = $val1, !2 = $val2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_STATIC_PROP_R          unknown             ~3      'dodad'
          1        ASSIGN                                                   !0, ~3
   14     2        FETCH_DIM_R                                      ~5      !0, 0
          3        ASSIGN                                                   !1, ~5
   15     4        FETCH_DIM_R                                      ~7      !0, 1
          5        ASSIGN                                                   !2, ~7
   16     6      > RETURN                                                   null

End of function t2

End of class thing.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.45 ms | 1385 KiB | 13 Q