3v4l.org

run code in 300+ PHP versions simultaneously
<?php $boms = array("\xef\xbf\xbe" => '', "\xef\xbf\xbf" => '',); $array = array( "BOMがマルチバイト文字に分断されたもの"=>"あ\xefい\xbf\xbeう\xef\xbfえ\xbfお", "制御文字でBOMが分断されたもの" => "あい\xef\xbf\x07\xbeう\xef\x1f\xbf\xbfえお", "U+FFFE" => "\xef\xbf\xbe", "U+FFFF" => "\xef\xbf\xbf", "1バイト" => "\xef", "2バイト" => "\xef\xbf", "おしい" => "\xef\xbf\x6a" ); foreach($array as $key => $str) { echo $key . " "; echo var_dump(mb_strpos($str, $boms)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/EPHcN
function name:  (null)
number of ops:  18
compiled vars:  !0 = $boms, !1 = $array, !2 = $str, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
   14     2      > FE_RESET_R                                       $6      !1, ->16
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->16
          4    >   ASSIGN                                                   !3, ~7
   15     5        CONCAT                                           ~9      !3, '+'
          6        ECHO                                                     ~9
   16     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'mb_strpos'
          9        SEND_VAR                                                 !2
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $10     
         12        SEND_VAR                                                 $10
         13        DO_ICALL                                         $11     
         14        ECHO                                                     $11
   14    15      > JMP                                                      ->3
         16    >   FE_FREE                                                  $6
   17    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.5 ms | 1399 KiB | 17 Q