3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fdopen($id, $mode) { return fopen("/proc/self/fd/".(int)$id, $mode); } echo file_get_contents("php://fd/0");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gAbi7
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'file_get_contents'
          1        SEND_VAL                                                 'php%3A%2F%2Ffd%2F0'
          2        DO_ICALL                                         $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function fdopen:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gAbi7
function name:  fdopen
number of ops:  10
compiled vars:  !0 = $id, !1 = $mode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'fopen'
          3        CAST                                          4  ~2      !0
          4        CONCAT                                           ~3      '%2Fproc%2Fself%2Ffd%2F', ~2
          5        SEND_VAL                                                 ~3
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $4      
          8      > RETURN                                                   $4
    5     9*     > RETURN                                                   null

End of function fdopen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.86 ms | 1386 KiB | 17 Q