3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_GET=array(); $_GET['a'] = '{"a1":"1337a","a2":[[],0,3,4,5]}'; $_GET['b'] = "0.00.0"; $_GET['c'] = array("\031c3", "1"); $_GET['d'] = array(); $v1=0;$v2=0;$v3=0;$v4=0; $a=(array)json_decode(@$_GET['a']); if(is_array($a)){ is_numeric(@$a["a1"])?die("nope"):NULL; if(@$a["a1"]){ ($a["a1"]>1336)?$v1=1:NULL; } if(is_array(@$a["a2"])){ if(count($a["a2"])!==5 OR !is_array($a["a2"][0])) die("nope"); $pos = array_search("ctf", $a["a2"]); $pos===false?die("nope"):NULL; foreach($a["a2"] as $key=>$val){ $val==="ctf"?die("nope"):NULL; } $v2=1; } } if(preg_match("/^([0-9]+\.?[0-9]+)+$/",@$_GET['b'])){ $b=json_decode(@$_GET['b']); if($var = $b === NULL){ ($var===true)?$v3=1:NULL; } } $c=@$_GET['c']; $d=@$_GET['d']; if(@$c[1]){ if(!strcmp($c[1],$d) && $c[1]!==$d){ eregi("3|1|c",$d.$c[0])?die("nope4"):NULL; strpos(($c[0].$d), "31c3")?$v4=1:NULL; } } var_dump($v1, $v2, $v3, $v4); if($v1 && $v2 && $v3 && $v4){ echo 'yes'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 96
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 39
Branch analysis from position: 36
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 53
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 51
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
2 jumps found. (Code = 43) Position 1 = 58, Position 2 = 96
Branch analysis from position: 58
2 jumps found. (Code = 47) Position 1 = 62, Position 2 = 67
Branch analysis from position: 62
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 69
Branch analysis from position: 68
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 69
2 jumps found. (Code = 43) Position 1 = 77, Position 2 = 80
Branch analysis from position: 77
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 80
2 jumps found. (Code = 77) Position 1 = 84, Position 2 = 94
Branch analysis from position: 84
2 jumps found. (Code = 78) Position 1 = 85, Position 2 = 94
Branch analysis from position: 85
2 jumps found. (Code = 43) Position 1 = 88, Position 2 = 91
Branch analysis from position: 88
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 91
1 jumps found. (Code = 42) Position 1 = 84
Branch analysis from position: 84
Branch analysis from position: 94
2 jumps found. (Code = 43) Position 1 = 105, Position 2 = 123
Branch analysis from position: 105
2 jumps found. (Code = 43) Position 1 = 116, Position 2 = 123
Branch analysis from position: 116
2 jumps found. (Code = 43) Position 1 = 118, Position 2 = 121
Branch analysis from position: 118
1 jumps found. (Code = 42) Position 1 = 122
Branch analysis from position: 122
2 jumps found. (Code = 43) Position 1 = 137, Position 2 = 172
Branch analysis from position: 137
2 jumps found. (Code = 46) Position 1 = 144, Position 2 = 147
Branch analysis from position: 144
2 jumps found. (Code = 43) Position 1 = 148, Position 2 = 172
Branch analysis from position: 148
2 jumps found. (Code = 43) Position 1 = 155, Position 2 = 158
Branch analysis from position: 155
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 158
2 jumps found. (Code = 43) Position 1 = 167, Position 2 = 170
Branch analysis from position: 167
1 jumps found. (Code = 42) Position 1 = 171
Branch analysis from position: 171
2 jumps found. (Code = 46) Position 1 = 179, Position 2 = 180
Branch analysis from position: 179
2 jumps found. (Code = 46) Position 1 = 181, Position 2 = 182
Branch analysis from position: 181
2 jumps found. (Code = 46) Position 1 = 183, Position 2 = 184
Branch analysis from position: 183
2 jumps found. (Code = 43) Position 1 = 185, Position 2 = 186
Branch analysis from position: 185
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 186
Branch analysis from position: 184
Branch analysis from position: 182
Branch analysis from position: 180
Branch analysis from position: 170
2 jumps found. (Code = 46) Position 1 = 179, Position 2 = 180
Branch analysis from position: 179
Branch analysis from position: 180
Branch analysis from position: 172
Branch analysis from position: 147
Branch analysis from position: 172
Branch analysis from position: 121
2 jumps found. (Code = 43) Position 1 = 137, Position 2 = 172
Branch analysis from position: 137
Branch analysis from position: 172
Branch analysis from position: 123
Branch analysis from position: 123
Branch analysis from position: 94
Branch analysis from position: 67
Branch analysis from position: 96
Branch analysis from position: 51
2 jumps found. (Code = 43) Position 1 = 58, Position 2 = 96
Branch analysis from position: 58
Branch analysis from position: 96
Branch analysis from position: 53
Branch analysis from position: 96
filename:       /in/vhAW6
function name:  (null)
number of ops:  187
compiled vars:  !0 = $v1, !1 = $v2, !2 = $v3, !3 = $v4, !4 = $a, !5 = $pos, !6 = $val, !7 = $key, !8 = $b, !9 = $var, !10 = $c, !11 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_W                      global              $12     '_GET'
          1        ASSIGN                                                   $12, <array>
    3     2        FETCH_W                      global              $14     '_GET'
          3        ASSIGN_DIM                                               $14, 'a'
          4        OP_DATA                                                  '%7B%22a1%22%3A%221337a%22%2C%22a2%22%3A%5B%5B%5D%2C0%2C3%2C4%2C5%5D%7D'
    4     5        FETCH_W                      global              $16     '_GET'
          6        ASSIGN_DIM                                               $16, 'b'
          7        OP_DATA                                                  '0.00.0'
    5     8        FETCH_W                      global              $18     '_GET'
          9        ASSIGN_DIM                                               $18, 'c'
         10        OP_DATA                                                  <array>
    6    11        FETCH_W                      global              $20     '_GET'
         12        ASSIGN_DIM                                               $20, 'd'
         13        OP_DATA                                                  <array>
    7    14        ASSIGN                                                   !0, 0
         15        ASSIGN                                                   !1, 0
         16        ASSIGN                                                   !2, 0
         17        ASSIGN                                                   !3, 0
    8    18        INIT_FCALL                                               'json_decode'
         19        BEGIN_SILENCE                                    ~26     
         20        FETCH_R                      global              ~27     '_GET'
         21        FETCH_DIM_R                                      ~28     ~27, 'a'
         22        END_SILENCE                                              ~26
         23        SEND_VAL                                                 ~28
         24        DO_ICALL                                         $29     
         25        CAST                                          7  ~30     $29
         26        ASSIGN                                                   !4, ~30
    9    27        TYPE_CHECK                                  128          !4
         28      > JMPZ                                                     ~32, ->96
   10    29    >   INIT_FCALL                                               'is_numeric'
         30        BEGIN_SILENCE                                    ~33     
         31        FETCH_DIM_R                                      ~34     !4, 'a1'
         32        END_SILENCE                                              ~33
         33        SEND_VAL                                                 ~34
         34        DO_ICALL                                         $35     
         35      > JMPZ                                                     $35, ->39
         36    > > EXIT                                                     'nope'
         37*       QM_ASSIGN                                        ~36     <true>
         38*       JMP                                                      ->40
         39    >   QM_ASSIGN                                        ~36     null
         40        FREE                                                     ~36
   11    41        BEGIN_SILENCE                                    ~37     
         42        FETCH_DIM_R                                      ~38     !4, 'a1'
         43        END_SILENCE                                              ~37
         44      > JMPZ                                                     ~38, ->53
   12    45    >   FETCH_DIM_R                                      ~39     !4, 'a1'
         46        IS_SMALLER                                               1336, ~39
         47      > JMPZ                                                     ~40, ->51
         48    >   ASSIGN                                           ~41     !0, 1
         49        QM_ASSIGN                                        ~42     ~41
         50      > JMP                                                      ->52
         51    >   QM_ASSIGN                                        ~42     null
         52    >   FREE                                                     ~42
   14    53    >   BEGIN_SILENCE                                    ~43     
         54        FETCH_DIM_R                                      ~44     !4, 'a2'
         55        END_SILENCE                                              ~43
         56        TYPE_CHECK                                  128          ~44
         57      > JMPZ                                                     ~45, ->96
   15    58    >   FETCH_DIM_R                                      ~46     !4, 'a2'
         59        COUNT                                            ~47     ~46
         60        IS_NOT_IDENTICAL                                 ~48     ~47, 5
         61      > JMPNZ_EX                                         ~48     ~48, ->67
         62    >   FETCH_DIM_R                                      ~49     !4, 'a2'
         63        FETCH_DIM_R                                      ~50     ~49, 0
         64        TYPE_CHECK                                  128  ~51     ~50
         65        BOOL_NOT                                         ~52     ~51
         66        BOOL                                             ~48     ~52
         67    > > JMPZ                                                     ~48, ->69
         68    > > EXIT                                                     'nope'
   16    69    >   INIT_FCALL                                               'array_search'
         70        SEND_VAL                                                 'ctf'
         71        FETCH_DIM_R                                      ~53     !4, 'a2'
         72        SEND_VAL                                                 ~53
         73        DO_ICALL                                         $54     
         74        ASSIGN                                                   !5, $54
   17    75        TYPE_CHECK                                    4          !5
         76      > JMPZ                                                     ~56, ->80
         77    > > EXIT                                                     'nope'
         78*       QM_ASSIGN                                        ~57     <true>
         79*       JMP                                                      ->81
         80    >   QM_ASSIGN                                        ~57     null
         81        FREE                                                     ~57
   18    82        FETCH_DIM_R                                      ~58     !4, 'a2'
         83      > FE_RESET_R                                       $59     ~58, ->94
         84    > > FE_FETCH_R                                       ~60     $59, !6, ->94
         85    >   ASSIGN                                                   !7, ~60
   19    86        IS_IDENTICAL                                             !6, 'ctf'
         87      > JMPZ                                                     ~62, ->91
         88    > > EXIT                                                     'nope'
         89*       QM_ASSIGN                                        ~63     <true>
         90*       JMP                                                      ->92
         91    >   QM_ASSIGN                                        ~63     null
         92        FREE                                                     ~63
   18    93      > JMP                                                      ->84
         94    >   FE_FREE                                                  $59
   21    95        ASSIGN                                                   !1, 1
   24    96    >   INIT_FCALL                                               'preg_match'
         97        SEND_VAL                                                 '%2F%5E%28%5B0-9%5D%2B%5C.%3F%5B0-9%5D%2B%29%2B%24%2F'
         98        BEGIN_SILENCE                                    ~65     
         99        FETCH_R                      global              ~66     '_GET'
        100        FETCH_DIM_R                                      ~67     ~66, 'b'
        101        END_SILENCE                                              ~65
        102        SEND_VAL                                                 ~67
        103        DO_ICALL                                         $68     
        104      > JMPZ                                                     $68, ->123
   25   105    >   INIT_FCALL                                               'json_decode'
        106        BEGIN_SILENCE                                    ~69     
        107        FETCH_R                      global              ~70     '_GET'
        108        FETCH_DIM_R                                      ~71     ~70, 'b'
        109        END_SILENCE                                              ~69
        110        SEND_VAL                                                 ~71
        111        DO_ICALL                                         $72     
        112        ASSIGN                                                   !8, $72
   26   113        TYPE_CHECK                                    2  ~74     !8
        114        ASSIGN                                           ~75     !9, ~74
        115      > JMPZ                                                     ~75, ->123
   27   116    >   TYPE_CHECK                                    8          !9
        117      > JMPZ                                                     ~76, ->121
        118    >   ASSIGN                                           ~77     !2, 1
        119        QM_ASSIGN                                        ~78     ~77
        120      > JMP                                                      ->122
        121    >   QM_ASSIGN                                        ~78     null
        122    >   FREE                                                     ~78
   30   123    >   BEGIN_SILENCE                                    ~79     
        124        FETCH_R                      global              ~80     '_GET'
        125        FETCH_DIM_R                                      ~81     ~80, 'c'
        126        END_SILENCE                                              ~79
        127        ASSIGN                                                   !10, ~81
   31   128        BEGIN_SILENCE                                    ~83     
        129        FETCH_R                      global              ~84     '_GET'
        130        FETCH_DIM_R                                      ~85     ~84, 'd'
        131        END_SILENCE                                              ~83
        132        ASSIGN                                                   !11, ~85
   32   133        BEGIN_SILENCE                                    ~87     
        134        FETCH_DIM_R                                      ~88     !10, 1
        135        END_SILENCE                                              ~87
        136      > JMPZ                                                     ~88, ->172
   33   137    >   INIT_FCALL                                               'strcmp'
        138        FETCH_DIM_R                                      ~89     !10, 1
        139        SEND_VAL                                                 ~89
        140        SEND_VAR                                                 !11
        141        DO_ICALL                                         $90     
        142        BOOL_NOT                                         ~91     $90
        143      > JMPZ_EX                                          ~91     ~91, ->147
        144    >   FETCH_DIM_R                                      ~92     !10, 1
        145        IS_NOT_IDENTICAL                                 ~93     !11, ~92
        146        BOOL                                             ~91     ~93
        147    > > JMPZ                                                     ~91, ->172
   34   148    >   INIT_FCALL_BY_NAME                                       'eregi'
        149        SEND_VAL_EX                                              '3%7C1%7Cc'
        150        FETCH_DIM_R                                      ~94     !10, 0
        151        CONCAT                                           ~95     !11, ~94
        152        SEND_VAL_EX                                              ~95
        153        DO_FCALL                                      0  $96     
        154      > JMPZ                                                     $96, ->158
        155    > > EXIT                                                     'nope4'
        156*       QM_ASSIGN                                        ~97     <true>
        157*       JMP                                                      ->159
        158    >   QM_ASSIGN                                        ~97     null
        159        FREE                                                     ~97
   35   160        INIT_FCALL                                               'strpos'
        161        FETCH_DIM_R                                      ~98     !10, 0
        162        CONCAT                                           ~99     ~98, !11
        163        SEND_VAL                                                 ~99
        164        SEND_VAL                                                 '31c3'
        165        DO_ICALL                                         $100    
        166      > JMPZ                                                     $100, ->170
        167    >   ASSIGN                                           ~101    !3, 1
        168        QM_ASSIGN                                        ~102    ~101
        169      > JMP                                                      ->171
        170    >   QM_ASSIGN                                        ~102    null
        171    >   FREE                                                     ~102
   38   172    >   INIT_FCALL                                               'var_dump'
        173        SEND_VAR                                                 !0
        174        SEND_VAR                                                 !1
        175        SEND_VAR                                                 !2
        176        SEND_VAR                                                 !3
        177        DO_ICALL                                                 
   39   178      > JMPZ_EX                                          ~104    !0, ->180
        179    >   BOOL                                             ~104    !1
        180    > > JMPZ_EX                                          ~104    ~104, ->182
        181    >   BOOL                                             ~104    !2
        182    > > JMPZ_EX                                          ~104    ~104, ->184
        183    >   BOOL                                             ~104    !3
        184    > > JMPZ                                                     ~104, ->186
   40   185    >   ECHO                                                     'yes'
   41   186    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.28 ms | 1412 KiB | 27 Q