3v4l.org

run code in 300+ PHP versions simultaneously
<?php $haystack = "your string..."; $needle = "<b>quick brown</b>"; echo str_repeat($needle . "<br>", substr_count($haystack, $needle));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v8WDv
function name:  (null)
number of ops:  13
compiled vars:  !0 = $haystack, !1 = $needle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'your+string...'
    3     1        ASSIGN                                                   !1, '%3Cb%3Equick+brown%3C%2Fb%3E'
    4     2        INIT_FCALL                                               'str_repeat'
          3        CONCAT                                           ~4      !1, '%3Cbr%3E'
          4        SEND_VAL                                                 ~4
          5        INIT_FCALL                                               'substr_count'
          6        SEND_VAR                                                 !0
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                         $6      
         11        ECHO                                                     $6
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.75 ms | 1394 KiB | 17 Q