3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function saveSession() { $res = serialize($_SESSION['foo']); var_dump($res); } } session_start(); $_SESSION['foo'] = array('some'=>'data');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/16S1K
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
   15     2        FETCH_W                      global              $1      '_SESSION'
          3        ASSIGN_DIM                                               $1, 'foo'
          4        OP_DATA                                                  <array>
          5      > RETURN                                                   1

Class Foo:
Function savesession:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/16S1K
function name:  saveSession
number of ops:  10
compiled vars:  !0 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'serialize'
          1        FETCH_R                      global              ~1      '_SESSION'
          2        FETCH_DIM_R                                      ~2      ~1, 'foo'
          3        SEND_VAL                                                 ~2
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    9     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   10     9      > RETURN                                                   null

End of function savesession

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.62 ms | 1395 KiB | 19 Q