3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!function_exists('cd')) { function cd($var) { var_dump($var); } } function corban_error_handler($errno , $errstr, $errfile, $errline) { echo '<pre>'; print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)); echo '</pre>'; cd($errno); cd($errstr); cd($errfile); cd($errline); if ( version_compare(PHP_VERSION, '5.0.0', '>=') ) { $file = new SplFileObject($errfile); $file->seek($errline-1); echo $file->current(); } return false; } set_error_handler ('corban_error_handler', E_NOTICE); $b = null; cd($a); cd($b);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/I0oPO
function name:  (null)
number of ops:  18
compiled vars:  !0 = $b, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'cd'
          2        DO_ICALL                                         $2      
          3        BOOL_NOT                                         ~3      $2
          4      > JMPZ                                                     ~3, ->6
    5     5    >   DECLARE_FUNCTION                                         'cd'
   31     6    >   INIT_FCALL                                               'set_error_handler'
          7        SEND_VAL                                                 'corban_error_handler'
          8        SEND_VAL                                                 8
          9        DO_ICALL                                                 
   33    10        ASSIGN                                                   !0, null
   34    11        INIT_FCALL_BY_NAME                                       'cd'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
   35    14        INIT_FCALL_BY_NAME                                       'cd'
         15        SEND_VAR_EX                                              !0
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

Function %00cd%2Fin%2FI0oPO%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I0oPO
function name:  cd
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    8     4      > RETURN                                                   null

End of function %00cd%2Fin%2FI0oPO%3A5%240

Function corban_error_handler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 41
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
filename:       /in/I0oPO
function name:  corban_error_handler
number of ops:  43
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline, !4 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   13     4        ECHO                                                     '%3Cpre%3E'
   14     5        INIT_FCALL                                               'print_r'
          6        INIT_FCALL                                               'debug_backtrace'
          7        SEND_VAL                                                 2
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
   15    11        ECHO                                                     '%3C%2Fpre%3E'
   16    12        INIT_FCALL_BY_NAME                                       'cd'
         13        SEND_VAR_EX                                              !0
         14        DO_FCALL                                      0          
   17    15        INIT_FCALL_BY_NAME                                       'cd'
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0          
   18    18        INIT_FCALL_BY_NAME                                       'cd'
         19        SEND_VAR_EX                                              !2
         20        DO_FCALL                                      0          
   19    21        INIT_FCALL_BY_NAME                                       'cd'
         22        SEND_VAR_EX                                              !3
         23        DO_FCALL                                      0          
   21    24        INIT_FCALL                                               'version_compare'
         25        SEND_VAL                                                 '8.0.0'
         26        SEND_VAL                                                 '5.0.0'
         27        SEND_VAL                                                 '%3E%3D'
         28        DO_ICALL                                         $11     
         29      > JMPZ                                                     $11, ->41
   23    30    >   NEW                                              $12     'SplFileObject'
         31        SEND_VAR_EX                                              !2
         32        DO_FCALL                                      0          
         33        ASSIGN                                                   !4, $12
   24    34        INIT_METHOD_CALL                                         !4, 'seek'
         35        SUB                                              ~15     !3, 1
         36        SEND_VAL_EX                                              ~15
         37        DO_FCALL                                      0          
   25    38        INIT_METHOD_CALL                                         !4, 'current'
         39        DO_FCALL                                      0  $17     
         40        ECHO                                                     $17
   27    41    > > RETURN                                                   <false>
   29    42*     > RETURN                                                   null

End of function corban_error_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.56 ms | 1400 KiB | 25 Q