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); $c = substr(trim($file->current()), 0, 3); if ($c=='cd(' || $c=='cd ') { cd($c); } } return false; } set_error_handler ('corban_error_handler', E_NOTICE); var_dump($a); $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/OXZE0
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $b
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'
   35     6    >   INIT_FCALL                                               'set_error_handler'
          7        SEND_VAL                                                 'corban_error_handler'
          8        SEND_VAL                                                 8
          9        DO_ICALL                                                 
   36    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   37    13        ASSIGN                                                   !1, null
   38    14        INIT_FCALL_BY_NAME                                       'cd'
         15        SEND_VAR_EX                                              !0
         16        DO_FCALL                                      0          
   39    17        INIT_FCALL_BY_NAME                                       'cd'
         18        SEND_VAR_EX                                              !1
         19        DO_FCALL                                      0          
         20      > RETURN                                                   1

Function %00cd%2Fin%2FOXZE0%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OXZE0
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%2FOXZE0%3A5%240

Function corban_error_handler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 57
Branch analysis from position: 30
2 jumps found. (Code = 47) Position 1 = 51, Position 2 = 53
Branch analysis from position: 51
2 jumps found. (Code = 43) Position 1 = 54, Position 2 = 57
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 57
Branch analysis from position: 53
Branch analysis from position: 57
filename:       /in/OXZE0
function name:  corban_error_handler
number of ops:  59
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline, !4 = $file, !5 = $c
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                                         $6      
          9        SEND_VAR                                                 $6
         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                                         $12     
         29      > JMPZ                                                     $12, ->57
   23    30    >   NEW                                              $13     'SplFileObject'
         31        SEND_VAR_EX                                              !2
         32        DO_FCALL                                      0          
         33        ASSIGN                                                   !4, $13
   24    34        INIT_METHOD_CALL                                         !4, 'seek'
         35        SUB                                              ~16     !3, 1
         36        SEND_VAL_EX                                              ~16
         37        DO_FCALL                                      0          
   25    38        INIT_FCALL                                               'substr'
         39        INIT_FCALL                                               'trim'
         40        INIT_METHOD_CALL                                         !4, 'current'
         41        DO_FCALL                                      0  $18     
         42        SEND_VAR                                                 $18
         43        DO_ICALL                                         $19     
         44        SEND_VAR                                                 $19
         45        SEND_VAL                                                 0
         46        SEND_VAL                                                 3
         47        DO_ICALL                                         $20     
         48        ASSIGN                                                   !5, $20
   26    49        IS_EQUAL                                         ~22     !5, 'cd%28'
         50      > JMPNZ_EX                                         ~22     ~22, ->53
         51    >   IS_EQUAL                                         ~23     !5, 'cd+'
         52        BOOL                                             ~22     ~23
         53    > > JMPZ                                                     ~22, ->57
   28    54    >   INIT_FCALL_BY_NAME                                       'cd'
         55        SEND_VAR_EX                                              !5
         56        DO_FCALL                                      0          
   31    57    > > RETURN                                                   <false>
   33    58*     > RETURN                                                   null

End of function corban_error_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.75 ms | 1408 KiB | 29 Q