3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fh = fopen('/dev/urandom', 'r'); print_r($fh); echo "\n"; var_export($fh); echo "\n"; var_dump($fh); echo "\n"; printf( '%s of type "%s"', print_r($fh, true), get_resource_type($fh) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5rmHr
function name:  (null)
number of ops:  30
compiled vars:  !0 = $fh
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 '%2Fdev%2Furandom'
          2        SEND_VAL                                                 'r'
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    4     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    5     8        ECHO                                                     '%0A'
    6     9        INIT_FCALL                                               'var_export'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
    7    12        ECHO                                                     '%0A'
    8    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
    9    16        ECHO                                                     '%0A'
   10    17        INIT_FCALL                                               'printf'
   11    18        SEND_VAL                                                 '%25s+of+type+%22%25s%22'
   12    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $6      
         23        SEND_VAR                                                 $6
   13    24        INIT_FCALL                                               'get_resource_type'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $7      
         27        SEND_VAR                                                 $7
         28        DO_ICALL                                                 
   14    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.52 ms | 1395 KiB | 25 Q