3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_urlEncoded($string){ $test_string = $string; while(urldecode($test_string) != $test_string){ $test_string = urldecode($test_string); } return urlencode($test_string) == $string; } $x ="Océ"; if(is_urlEncoded($x)){ echo "ist encoded"; } else { echo "ist nicht encoded"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aFnHb
function name:  (null)
number of ops:  9
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 'Oc%C3%A9'
   13     1        INIT_FCALL                                               'is_urlencoded'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4      > JMPZ                                                     $2, ->7
   14     5    >   ECHO                                                     'ist+encoded'
          6      > JMP                                                      ->8
   16     7    >   ECHO                                                     'ist+nicht+encoded'
   17     8    > > RETURN                                                   1

Function is_urlencoded:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
Branch analysis from position: 3
filename:       /in/aFnHb
function name:  is_urlEncoded
number of ops:  18
compiled vars:  !0 = $string, !1 = $test_string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, !0
    5     2      > JMP                                                      ->7
    6     3    >   INIT_FCALL                                               'urldecode'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    5     7    >   INIT_FCALL                                               'urldecode'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $5      
         10        IS_NOT_EQUAL                                             !1, $5
         11      > JMPNZ                                                    ~6, ->3
    8    12    >   INIT_FCALL                                               'urlencode'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $7      
         15        IS_EQUAL                                         ~8      !0, $7
         16      > RETURN                                                   ~8
    9    17*     > RETURN                                                   null

End of function is_urlencoded

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.76 ms | 1399 KiB | 18 Q