3v4l.org

run code in 300+ PHP versions simultaneously
<?php $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("file", "/tmp/error-output.txt", "a") ); $cwd = '/tmp'; $env = array('some_option' => 'aeiou'); $process = proc_open('/bin/ls', $descriptorspec, $pipes, $cwd); var_dump($process); echo stream_get_contents($pipes[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BQa5N
function name:  (null)
number of ops:  19
compiled vars:  !0 = $descriptorspec, !1 = $cwd, !2 = $env, !3 = $process, !4 = $pipes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, '%2Ftmp'
    9     2        ASSIGN                                                   !2, <array>
   11     3        INIT_FCALL                                               'proc_open'
          4        SEND_VAL                                                 '%2Fbin%2Fls'
          5        SEND_VAR                                                 !0
          6        SEND_REF                                                 !4
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !3, $8
   12    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                                 
   13    13        INIT_FCALL                                               'stream_get_contents'
         14        FETCH_DIM_R                                      ~11     !4, 1
         15        SEND_VAL                                                 ~11
         16        DO_ICALL                                         $12     
         17        ECHO                                                     $12
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.15 ms | 1394 KiB | 19 Q