3v4l.org

run code in 300+ PHP versions simultaneously
<?php function read($nl2br = false) { if ($read = fread($this->handle, filesize($this->file))) { if ($nl2br == true) { fclose($this->handle); return nl2br($read); } fclose($this->handle); return $read; } else { fclose($this->handle); return false; } } echo read("/proc/self/mem");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J3s6A
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'read'
          1        SEND_VAL                                                 '%2Fproc%2Fself%2Fmem'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function read:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 32
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 25
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J3s6A
function name:  read
number of ops:  39
compiled vars:  !0 = $nl2br, !1 = $read
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      <false>
    5     1        INIT_FCALL                                               'fread'
          2        FETCH_THIS                                       $2      
          3        FETCH_OBJ_R                                      ~3      $2, 'handle'
          4        SEND_VAL                                                 ~3
          5        INIT_FCALL                                               'filesize'
          6        FETCH_THIS                                       $4      
          7        FETCH_OBJ_R                                      ~5      $4, 'file'
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                         $7      
         12        ASSIGN                                           ~8      !1, $7
         13      > JMPZ                                                     ~8, ->32
    7    14    >   BOOL                                             ~9      !0
         15      > JMPZ                                                     ~9, ->25
    9    16    >   INIT_FCALL                                               'fclose'
         17        FETCH_THIS                                       $10     
         18        FETCH_OBJ_R                                      ~11     $10, 'handle'
         19        SEND_VAL                                                 ~11
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'nl2br'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $13     
         24      > RETURN                                                   $13
   13    25    >   INIT_FCALL                                               'fclose'
         26        FETCH_THIS                                       $14     
         27        FETCH_OBJ_R                                      ~15     $14, 'handle'
         28        SEND_VAL                                                 ~15
         29        DO_ICALL                                                 
   14    30      > RETURN                                                   !1
         31*       JMP                                                      ->38
   18    32    >   INIT_FCALL                                               'fclose'
         33        FETCH_THIS                                       $17     
         34        FETCH_OBJ_R                                      ~18     $17, 'handle'
         35        SEND_VAL                                                 ~18
         36        DO_ICALL                                                 
   19    37      > RETURN                                                   <false>
   21    38*     > RETURN                                                   null

End of function read

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.67 ms | 1407 KiB | 22 Q