3v4l.org

run code in 500+ PHP versions simultaneously
<?php error_reporting(E_ALL); ini_set('display_errors', 1); echo "=== realpath of missing path ===\n"; var_dump(realpath(dirname('/var/www/html').'/conf/session')); var_dump(realpath('/nonexistent-xyz')); echo "=== ini_set save_path with false ===\n"; $r = ini_set('session.save_path', false); var_dump($r); echo "save_path now: "; var_dump(ini_get('session.save_path')); echo "=== session_start with empty save_path ===\n"; try { var_dump(session_start()); } catch (Throwable $e) { echo "THROWN: ", get_class($e), ": ", $e->getMessage(), "\n"; } echo "SID: "; var_dump(session_id()); $_SESSION['test'] = 1; echo "session works? "; var_dump(isset($_SESSION['test']));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 45
Branch analysis from position: 45
2 jumps found. (Code = 107) Position 1 = 46, Position 2 = -2
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2WsMv
function name:  (null)
number of ops:  70
compiled vars:  !0 = $r, !1 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                                   'error_reporting'
          1        SEND_VAL                                                     30719
          2        DO_ICALL                                                     
    3     3        INIT_FCALL                                                   'ini_set'
          4        SEND_VAL                                                     'display_errors'
          5        SEND_VAL                                                     1
          6        DO_ICALL                                                     
    4     7        ECHO                                                         '%3D%3D%3D+realpath+of+missing+path+%3D%3D%3D%0A'
    5     8        INIT_FCALL                                                   'var_dump'
          9        INIT_FCALL                                                   'realpath'
         10        FRAMELESS_ICALL_1                dirname             ~4      '%2Fvar%2Fwww%2Fhtml'
         11        CONCAT                                               ~5      ~4, '%2Fconf%2Fsession'
         12        SEND_VAL                                                     ~5
         13        DO_ICALL                                             $6      
         14        SEND_VAR                                                     $6
         15        DO_ICALL                                                     
    6    16        INIT_FCALL                                                   'var_dump'
         17        INIT_FCALL                                                   'realpath'
         18        SEND_VAL                                                     '%2Fnonexistent-xyz'
         19        DO_ICALL                                             $8      
         20        SEND_VAR                                                     $8
         21        DO_ICALL                                                     
    8    22        ECHO                                                         '%3D%3D%3D+ini_set+save_path+with+false+%3D%3D%3D%0A'
    9    23        INIT_FCALL                                                   'ini_set'
         24        SEND_VAL                                                     'session.save_path'
         25        SEND_VAL                                                     <false>
         26        DO_ICALL                                             $10     
         27        ASSIGN                                                       !0, $10
   10    28        INIT_FCALL                                                   'var_dump'
         29        SEND_VAR                                                     !0
         30        DO_ICALL                                                     
   11    31        ECHO                                                         'save_path+now%3A+'
         32        INIT_FCALL                                                   'var_dump'
         33        INIT_FCALL                                                   'ini_get'
         34        SEND_VAL                                                     'session.save_path'
         35        DO_ICALL                                             $13     
         36        SEND_VAR                                                     $13
         37        DO_ICALL                                                     
   13    38        ECHO                                                         '%3D%3D%3D+session_start+with+empty+save_path+%3D%3D%3D%0A'
   14    39        INIT_FCALL                                                   'var_dump'
         40        INIT_FCALL                                                   'session_start'
         41        DO_ICALL                                             $15     
         42        SEND_VAR                                                     $15
         43        DO_ICALL                                                     
         44      > JMP                                                          ->54
         45  E > > CATCH                                           last         'Throwable'
         46    >   ECHO                                                         'THROWN%3A+'
         47        GET_CLASS                                            ~17     !1
         48        ECHO                                                         ~17
         49        ECHO                                                         '%3A+'
         50        INIT_METHOD_CALL                                             !1, 'getMessage'
         51        DO_FCALL                                          0  $18     
         52        ECHO                                                         $18
         53        ECHO                                                         '%0A'
   15    54    >   ECHO                                                         'SID%3A+'
         55        INIT_FCALL                                                   'var_dump'
         56        INIT_FCALL                                                   'session_id'
         57        DO_ICALL                                             $19     
         58        SEND_VAR                                                     $19
         59        DO_ICALL                                                     
   16    60        FETCH_W                          global              $21     '_SESSION'
         61        ASSIGN_DIM                                                   $21, 'test'
         62        OP_DATA                                                      1
   17    63        ECHO                                                         'session+works%3F+'
         64        INIT_FCALL                                                   'var_dump'
         65        FETCH_IS                                             ~23     '_SESSION'
         66        ISSET_ISEMPTY_DIM_OBJ                             0  ~24     ~23, 'test'
         67        SEND_VAL                                                     ~24
         68        DO_ICALL                                                     
         69      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
131.87 ms | 502 KiB | 16 Q