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]); echo 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 = 30
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/OQI7K
function name:  (null)
number of ops:  34
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, ->30
   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                                         $10     
         19        ECHO                                                     $10
   20    20        INIT_FCALL                                               'fclose'
         21        FETCH_DIM_R                                      ~11     !2, 1
         22        SEND_VAL                                                 ~11
         23        DO_ICALL                                                 
   22    24        INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'proc_close'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $13     
         28        SEND_VAR                                                 $13
         29        DO_ICALL                                                 
   25    30    >   INIT_FCALL                                               'print_r'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.27 ms | 1400 KiB | 25 Q