3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 4000; $i < 4100; ++$i) { $path = '../../../../../etc/' . str_repeat('/', $i) . 'passwd'; echo strlen($path . '.wtf').PHP_EOL; readfile($path . '.wtf'); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 2
Branch analysis from position: 20
Branch analysis from position: 2
filename:       /in/T6Zlr
function name:  (null)
number of ops:  21
compiled vars:  !0 = $i, !1 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 4000
          1      > JMP                                                      ->18
    4     2    >   INIT_FCALL                                               'str_repeat'
          3        SEND_VAL                                                 '%2F'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        CONCAT                                           ~4      '..%2F..%2F..%2F..%2F..%2Fetc%2F', $3
          7        CONCAT                                           ~5      ~4, 'passwd'
          8        ASSIGN                                                   !1, ~5
          9        CONCAT                                           ~7      !1, '.wtf'
         10        STRLEN                                           ~8      ~7
         11        CONCAT                                           ~9      ~8, '%0A'
         12        ECHO                                                     ~9
         13        INIT_FCALL                                               'readfile'
         14        CONCAT                                           ~10     !1, '.wtf'
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                                 
    2    17        PRE_INC                                                  !0
         18    >   IS_SMALLER                                               !0, 4100
         19      > JMPNZ                                                    ~13, ->2
    5    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.56 ms | 1395 KiB | 17 Q