3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = ['test' => [1,2,3]]; $process = proc_open( 'set', array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), ), $pipes, null, $x ); if (is_resource($process)) { fclose($pipes[0]); stream_get_contents($pipes[1]); fclose($pipes[1]); var_dump(proc_close($process)); } print_r($x);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 29
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/1KE87
function name:  (null)
number of ops:  33
compiled vars:  !0 = $x, !1 = $process, !2 = $pipes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'proc_open'
    6     2        SEND_VAL                                                 'set'
    8     3        SEND_VAL                                                 <array>
   11     4        SEND_REF                                                 !2
   12     5        SEND_VAL                                                 null
   13     6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
    5     8        ASSIGN                                                   !1, $4
   16     9        TYPE_CHECK                                  512          !1
         10      > JMPZ                                                     ~6, ->29
   17    11    >   INIT_FCALL                                               'fclose'
         12        FETCH_DIM_R                                      ~7      !2, 0
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                                 
   19    15        INIT_FCALL                                               'stream_get_contents'
         16        FETCH_DIM_R                                      ~9      !2, 1
         17        SEND_VAL                                                 ~9
         18        DO_ICALL                                                 
   20    19        INIT_FCALL                                               'fclose'
         20        FETCH_DIM_R                                      ~11     !2, 1
         21        SEND_VAL                                                 ~11
         22        DO_ICALL                                                 
   22    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'proc_close'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $13     
         27        SEND_VAR                                                 $13
         28        DO_ICALL                                                 
   25    29    >   INIT_FCALL                                               'print_r'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.38 ms | 1396 KiB | 25 Q