3v4l.org

run code in 300+ PHP versions simultaneously
<?php $product = ['name' => 'THIS IS À MULTIBYTE STRING']; $search = 'à'; echo 'with stripos: '; var_dump(stripos($product['name'], $search)); echo 'with mb_stripos: '; var_dump(mb_stripos($product['name'], $search));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UKkbj
function name:  (null)
number of ops:  21
compiled vars:  !0 = $product, !1 = $search
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, '%C3%A0'
    4     2        ECHO                                                     'with+stripos%3A+'
          3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'stripos'
          5        FETCH_DIM_R                                      ~4      !0, 'name'
          6        SEND_VAL                                                 ~4
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
    5    11        ECHO                                                     'with+mb_stripos%3A+'
         12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'mb_stripos'
         14        FETCH_DIM_R                                      ~7      !0, 'name'
         15        SEND_VAL                                                 ~7
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.22 ms | 1428 KiB | 16 Q