3v4l.org

run code in 300+ PHP versions simultaneously
<?php $your_crazy_input = chr(0)."flag"; if(isset($your_crazy_input)) { $position = strpos($your_crazy_input, "flag"); $length = strlen($your_crazy_input); echo $position; echo "\n"; echo $length; echo "\n"; $flag = 'hi'; echo urlencode(serialize(['qweq','that'])); if($position !== false && $length < 4) { echo $flag; } else { echo "Oh Sorry.. This isn't a crazy input."; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 30
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 30
filename:       /in/GVJM6
function name:  (null)
number of ops:  31
compiled vars:  !0 = $your_crazy_input, !1 = $position, !2 = $length, !3 = $flag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%00flag'
    4     1        ISSET_ISEMPTY_CV                                         !0
          2      > JMPZ                                                     ~5, ->30
    5     3    >   INIT_FCALL                                               'strpos'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 'flag'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
    6     8        STRLEN                                           ~8      !0
          9        ASSIGN                                                   !2, ~8
    7    10        ECHO                                                     !1
    8    11        ECHO                                                     '%0A'
    9    12        ECHO                                                     !2
   10    13        ECHO                                                     '%0A'
   11    14        ASSIGN                                                   !3, 'hi'
   12    15        INIT_FCALL                                               'urlencode'
         16        INIT_FCALL                                               'serialize'
         17        SEND_VAL                                                 <array>
         18        DO_ICALL                                         $11     
         19        SEND_VAR                                                 $11
         20        DO_ICALL                                         $12     
         21        ECHO                                                     $12
   13    22        TYPE_CHECK                                  1018  ~13     !1
         23      > JMPZ_EX                                          ~13     ~13, ->26
         24    >   IS_SMALLER                                       ~14     !2, 4
         25        BOOL                                             ~13     ~14
         26    > > JMPZ                                                     ~13, ->29
   14    27    >   ECHO                                                     !3
         28      > JMP                                                      ->30
   17    29    >   ECHO                                                     'Oh+Sorry..+This+isn%27t+a+crazy+input.'
   19    30    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.8 ms | 1396 KiB | 19 Q