3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 4060; $i < 4090; ++$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 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
Branch analysis from position: 2
filename:       /in/AaNQN
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, 4060
          1      > JMP                                                      ->10
    3     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
    2     9        PRE_INC                                                  !0
         10    >   IS_SMALLER                                               !0, 4090
         11      > JMPNZ                                                    ~8, ->2
    3    12    >   CONCAT                                           ~9      !1, '.wtf'
         13        STRLEN                                           ~10     ~9
         14        CONCAT                                           ~11     ~10, '%0A'
         15        ECHO                                                     ~11
         16        INIT_FCALL                                               'readfile'
         17        CONCAT                                           ~12     !1, '.wtf'
         18        SEND_VAL                                                 ~12
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.83 ms | 1395 KiB | 17 Q