3v4l.org

run code in 300+ PHP versions simultaneously
<?php $utf8_string = "àbcdèfgàbcdèfg"; $n = 0; foreach (array('è', 'à') as $char) { $n += substr_count($utf8_string, $char); } echo "Trovati: ", $n;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/uodQ7
function name:  (null)
number of ops:  14
compiled vars:  !0 = $utf8_string, !1 = $n, !2 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%C3%A0bcd%C3%A8fg%C3%A0bcd%C3%A8fg'
    4     1        ASSIGN                                                   !1, 0
    5     2      > FE_RESET_R                                       $5      <array>, ->10
          3    > > FE_FETCH_R                                               $5, !2, ->10
    6     4    >   INIT_FCALL                                               'substr_count'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $6      
          8        ASSIGN_OP                                     1          !1, $6
    5     9      > JMP                                                      ->3
         10    >   FE_FREE                                                  $5
    9    11        ECHO                                                     'Trovati%3A+'
         12        ECHO                                                     !1
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.32 ms | 997 KiB | 14 Q