3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($input) { $output = htmlspecialchars($input, ENT_QUOTES, 'UTF-8'); $code = str_replace('%', '\\x', rawurlencode($input)); if (validate_utf8($input)) { echo "【{$output}】({$code}) は有効なUTF-8シーケンスです。\n"; } else { echo "({$code}) は無効なUTF-8シーケンスです。\n"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RQ9RG
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 27
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RQ9RG
function name:  test
number of ops:  32
compiled vars:  !0 = $input, !1 = $output, !2 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'htmlspecialchars'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 3
          4        SEND_VAL                                                 'UTF-8'
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    5     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 '%25'
          9        SEND_VAL                                                 '%5Cx'
         10        INIT_FCALL                                               'rawurlencode'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !2, $6
    7    16        INIT_FCALL_BY_NAME                                       'validate_utf8'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0  $8      
         19      > JMPZ                                                     $8, ->27
    8    20    >   ROPE_INIT                                     5  ~10     '%E3%80%90'
         21        ROPE_ADD                                      1  ~10     ~10, !1
         22        ROPE_ADD                                      2  ~10     ~10, '%E3%80%91%28'
         23        ROPE_ADD                                      3  ~10     ~10, !2
         24        ROPE_END                                      4  ~9      ~10, '%29+%E3%81%AF%E6%9C%89%E5%8A%B9%E3%81%AAUTF-8%E3%82%B7%E3%83%BC%E3%82%B1%E3%83%B3%E3%82%B9%E3%81%A7%E3%81%99%E3%80%82%0A'
         25        ECHO                                                     ~9
         26      > JMP                                                      ->31
   10    27    >   ROPE_INIT                                     3  ~14     '%28'
         28        ROPE_ADD                                      1  ~14     ~14, !2
         29        ROPE_END                                      2  ~13     ~14, '%29+%E3%81%AF%E7%84%A1%E5%8A%B9%E3%81%AAUTF-8%E3%82%B7%E3%83%BC%E3%82%B1%E3%83%B3%E3%82%B9%E3%81%A7%E3%81%99%E3%80%82%0A'
         30        ECHO                                                     ~13
   13    31    > > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.37 ms | 1396 KiB | 19 Q