3v4l.org

run code in 300+ PHP versions simultaneously
<?php //include('/etc/profile'); $myfile = fopen("/tmp/hacked.txt", "w") or die("Unable to open file!"); $txt = "Server has been Fucked Up!\n"; fwrite($myfile, $txt); fclose($myfile); include('hacked.txt'); echo system("cat /tmp/hacked.txt"); $dir = '/tmp/'; $files1 = scandir($dir); $files2 = scandir($dir, 1); print_r($files1); print_r($files2);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hYRnC
function name:  (null)
number of ops:  38
compiled vars:  !0 = $myfile, !1 = $txt, !2 = $dir, !3 = $files1, !4 = $files2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 '%2Ftmp%2Fhacked.txt'
          2        SEND_VAL                                                 'w'
          3        DO_ICALL                                         $5      
          4        ASSIGN                                           ~6      !0, $5
          5      > JMPNZ_EX                                         ~6      ~6, ->8
          6    > > EXIT                                                     'Unable+to+open+file%21'
          7*       BOOL                                             ~6      <true>
    7     8    >   ASSIGN                                                   !1, 'Server+has+been+Fucked+Up%21%0A'
    8     9        INIT_FCALL                                               'fwrite'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
    9    13        INIT_FCALL                                               'fclose'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   11    16        INCLUDE_OR_EVAL                                          'hacked.txt', INCLUDE
   13    17        INIT_FCALL                                               'system'
         18        SEND_VAL                                                 'cat+%2Ftmp%2Fhacked.txt'
         19        DO_ICALL                                         $11     
         20        ECHO                                                     $11
   15    21        ASSIGN                                                   !2, '%2Ftmp%2F'
   16    22        INIT_FCALL                                               'scandir'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                         $13     
         25        ASSIGN                                                   !3, $13
   17    26        INIT_FCALL                                               'scandir'
         27        SEND_VAR                                                 !2
         28        SEND_VAL                                                 1
         29        DO_ICALL                                         $15     
         30        ASSIGN                                                   !4, $15
   19    31        INIT_FCALL                                               'print_r'
         32        SEND_VAR                                                 !3
         33        DO_ICALL                                                 
   20    34        INIT_FCALL                                               'print_r'
         35        SEND_VAR                                                 !4
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.19 ms | 1396 KiB | 25 Q