3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); function session_active() { if (function_exists('session_status')) { return (session_status() == PHP_SESSION_ACTIVE); } return defined('SID'); } var_dump(session_active()); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WQAdi
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
   11     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'session_active'
          4        DO_FCALL                                      0  $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                                 
   12     7      > RETURN                                                   1

Function session_active:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WQAdi
function name:  session_active
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'session_status'
          2        DO_ICALL                                         $0      
          3      > JMPZ                                                     $0, ->8
    6     4    >   INIT_FCALL                                               'session_status'
          5        DO_ICALL                                         $1      
          6        IS_EQUAL                                         ~2      $1, 2
          7      > RETURN                                                   ~2
    8     8    >   DEFINED                                          ~3      'SID'
          9      > RETURN                                                   ~3
    9    10*     > RETURN                                                   null

End of function session_active

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
195.4 ms | 1398 KiB | 22 Q