3v4l.org

run code in 300+ PHP versions simultaneously
<?php method_exists('SplFileObject', 'fread') or die("No SplFileObject::fread()"); $i=0; $file = new SplFileObject(__FILE__); while ($file->valid()) { $chunk = $file->fread(20); $hex = array_map(function ($char) { return sprintf('%02X', ord($char)); }, str_split($chunk)); printf("%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 = 40
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 13
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 13
Branch analysis from position: 43
Branch analysis from position: 13
filename:       /in/DpvhB
function name:  (null)
number of ops:  44
compiled vars:  !0 = $i, !1 = $file, !2 = $chunk, !3 = $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                                         $4      
          4      > JMPNZ_EX                                         ~5      $4, ->7
          5    > > EXIT                                                     'No+SplFileObject%3A%3Afread%28%29'
          6*       BOOL                                             ~5      <true>
    4     7    >   ASSIGN                                                   !0, 0
    5     8        NEW                                              $7      'SplFileObject'
          9        SEND_VAL_EX                                              '%2Fin%2FDpvhB'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $7
    6    12      > JMP                                                      ->40
    7    13    >   INIT_METHOD_CALL                                         !1, 'fread'
         14        SEND_VAL_EX                                              20
         15        DO_FCALL                                      0  $10     
         16        ASSIGN                                                   !2, $10
    8    17        INIT_FCALL                                               'array_map'
         18        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FDpvhB%3A8%240'
         19        SEND_VAL                                                 ~12
         20        INIT_FCALL                                               'str_split'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $13     
         23        SEND_VAR                                                 $13
         24        DO_ICALL                                         $14     
         25        ASSIGN                                                   !3, $14
    9    26        INIT_FCALL                                               'printf'
         27        SEND_VAL                                                 '%25s++++%25s%0A'
         28        INIT_FCALL                                               'implode'
         29        SEND_VAL                                                 '+'
         30        SEND_VAR                                                 !3
         31        DO_ICALL                                         $16     
         32        SEND_VAR                                                 $16
         33        INIT_FCALL                                               'preg_replace'
         34        SEND_VAL                                                 '%2F%5B%5E%5B%3Aprint%3A%5D%5D%2F'
         35        SEND_VAL                                                 '.'
         36        SEND_VAR                                                 !2
         37        DO_ICALL                                         $17     
         38        SEND_VAR                                                 $17
         39        DO_ICALL                                                 
    6    40    >   INIT_METHOD_CALL                                         !1, 'valid'
         41        DO_FCALL                                      0  $19     
         42      > JMPNZ                                                    $19, ->13
   10    43    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FDpvhB%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DpvhB
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     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%2FDpvhB%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.94 ms | 1400 KiB | 29 Q