3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo syscall("ls -lathr"); function syscall($command){ if ($proc = popen("($command)2>&1","r")){ while (!feof($proc)) $result .= fgets($proc, 1000); pclose($proc); return $result; } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8S569
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'syscall'
          1        SEND_VAL_EX                                              'ls+-lathr'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   12     4      > RETURN                                                   1

Function syscall:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 25
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 11
Branch analysis from position: 21
Branch analysis from position: 11
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8S569
function name:  syscall
number of ops:  26
compiled vars:  !0 = $command, !1 = $proc, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'popen'
          2        ROPE_INIT                                     3  ~4      '%28'
          3        ROPE_ADD                                      1  ~4      ~4, !0
          4        ROPE_END                                      2  ~3      ~4, '%292%3E%261'
          5        SEND_VAL                                                 ~3
          6        SEND_VAL                                                 'r'
          7        DO_ICALL                                         $6      
          8        ASSIGN                                           ~7      !1, $6
          9      > JMPZ                                                     ~7, ->25
    7    10    > > JMP                                                      ->16
         11    >   INIT_FCALL                                               'fgets'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 1000
         14        DO_ICALL                                         $8      
         15        ASSIGN_OP                                     8          !2, $8
         16    >   INIT_FCALL                                               'feof'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $10     
         19        BOOL_NOT                                         ~11     $10
         20      > JMPNZ                                                    ~11, ->11
    8    21    >   INIT_FCALL                                               'pclose'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
    9    24      > RETURN                                                   !2
   11    25    > > RETURN                                                   null

End of function syscall

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.04 ms | 1401 KiB | 21 Q