3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkIntegerRangeTheWrongWay($int, $min, $max) { return ($int >= $min && $int <= $max); } assert(checkIntegerRange("6' OR 1=1", 5, 10));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SRMN0
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSERT_CHECK                                             
          1        INIT_FCALL                                               'assert'
          2        INIT_FCALL_BY_NAME                                       'checkIntegerRange'
          3        SEND_VAL_EX                                              '6%27+OR+1%3D1'
          4        SEND_VAL_EX                                              5
          5        SEND_VAL_EX                                              10
          6        DO_FCALL                                      0  $0      
          7        SEND_VAR                                                 $0
          8        SEND_VAL                                                 'assert%28checkIntegerRange%28%276%5C%27+OR+1%3D1%27%2C+5%2C+10%29%29'
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function checkintegerrangethewrongway:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/SRMN0
function name:  checkIntegerRangeTheWrongWay
number of ops:  9
compiled vars:  !0 = $int, !1 = $min, !2 = $max
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        IS_SMALLER_OR_EQUAL                              ~3      !1, !0
          4      > JMPZ_EX                                          ~3      ~3, ->7
          5    >   IS_SMALLER_OR_EQUAL                              ~4      !0, !2
          6        BOOL                                             ~3      ~4
          7    > > RETURN                                                   ~3
    5     8*     > RETURN                                                   null

End of function checkintegerrangethewrongway

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.12 ms | 1395 KiB | 15 Q