3v4l.org

run code in 300+ PHP versions simultaneously
<?php method_exists('SplFileObject', 'fread') or die("No SplFileObject::fread()"); $width = 16; $hex_width = 3 * $width; $file = new SplFileObject(__FILE__); while ($file->valid()) { $chunk = $file->fread($width); $hex = array_map(function ($char) { return sprintf('%02X', ord($char)); }, str_split($chunk)); printf("%-' {$hex_width}s %s\n", implode(' ', $hex), preg_replace('/[^[:print:]]/', '.', $chunk)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 15
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 15
Branch analysis from position: 48
Branch analysis from position: 15
filename:       /in/DQgb6
function name:  (null)
number of ops:  49
compiled vars:  !0 = $width, !1 = $hex_width, !2 = $file, !3 = $chunk, !4 = $hex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'method_exists'
          1        SEND_VAL                                                 'SplFileObject'
          2        SEND_VAL                                                 'fread'
          3        DO_ICALL                                         $5      
          4      > JMPNZ_EX                                         ~6      $5, ->7
          5    > > EXIT                                                     'No+SplFileObject%3A%3Afread%28%29'
          6*       BOOL                                             ~6      <true>
    4     7    >   ASSIGN                                                   !0, 16
    5     8        MUL                                              ~8      !0, 3
          9        ASSIGN                                                   !1, ~8
    6    10        NEW                                              $10     'SplFileObject'
         11        SEND_VAL_EX                                              '%2Fin%2FDQgb6'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $10
    7    14      > JMP                                                      ->45
    8    15    >   INIT_METHOD_CALL                                         !2, 'fread'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0  $13     
         18        ASSIGN                                                   !3, $13
    9    19        INIT_FCALL                                               'array_map'
         20        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FDQgb6%3A9%240'
         21        SEND_VAL                                                 ~15
         22        INIT_FCALL                                               'str_split'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                         $16     
         25        SEND_VAR                                                 $16
         26        DO_ICALL                                         $17     
         27        ASSIGN                                                   !4, $17
   10    28        INIT_FCALL                                               'printf'
         29        ROPE_INIT                                     3  ~20     '%25-%27+'
         30        ROPE_ADD                                      1  ~20     ~20, !1
         31        ROPE_END                                      2  ~19     ~20, 's++++%25s%0A'
         32        SEND_VAL                                                 ~19
         33        INIT_FCALL                                               'implode'
         34        SEND_VAL                                                 '+'
         35        SEND_VAR                                                 !4
         36        DO_ICALL                                         $22     
         37        SEND_VAR                                                 $22
         38        INIT_FCALL                                               'preg_replace'
         39        SEND_VAL                                                 '%2F%5B%5E%5B%3Aprint%3A%5D%5D%2F'
         40        SEND_VAL                                                 '.'
         41        SEND_VAR                                                 !3
         42        DO_ICALL                                         $23     
         43        SEND_VAR                                                 $23
         44        DO_ICALL                                                 
    7    45    >   INIT_METHOD_CALL                                         !2, 'valid'
         46        DO_FCALL                                      0  $25     
         47      > JMPNZ                                                    $25, ->15
   11    48    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FDQgb6%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DQgb6
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'sprintf'
          2        SEND_VAL                                                 '%2502X'
          3        INIT_FCALL                                               'ord'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                         $2      
          8      > RETURN                                                   $2
          9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FDQgb6%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.76 ms | 1400 KiB | 29 Q