3v4l.org

run code in 300+ PHP versions simultaneously
<?php $colors = array('black','yellow','red'); $color = 'reddish'; $string = implode(' ', $colors); echo substr_count($string, $color);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SXu5a
function name:  (null)
number of ops:  13
compiled vars:  !0 = $colors, !1 = $color, !2 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 'reddish'
    6     2        INIT_FCALL                                               'implode'
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    7     7        INIT_FCALL                                               'substr_count'
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        ECHO                                                     $7
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.3 ms | 1394 KiB | 17 Q