3v4l.org

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

Class test:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LN0V1
function name:  test
number of ops:  4
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_W                      global              $1      '_SESSION'
          1        FETCH_DIM_W                                      $2      $1, 'foo'
          2        ASSIGN_REF                                               !0, $2
    9     3      > RETURN                                                   null

End of function test

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.46 ms | 1386 KiB | 17 Q