3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "ab"; $s1 = "cAbfAbe"; echo substr(stristr($s1,$s),0,count($s)+1); echo "\n"; echo str_ireplace($s,$s,$s1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pjUG5
function name:  (null)
number of ops:  22
compiled vars:  !0 = $s, !1 = $s1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ab'
    4     1        ASSIGN                                                   !1, 'cAbfAbe'
    5     2        INIT_FCALL                                               'substr'
          3        INIT_FCALL                                               'stristr'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        SEND_VAL                                                 0
          9        COUNT                                            ~5      !0
         10        ADD                                              ~6      ~5, 1
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                         $7      
         13        ECHO                                                     $7
    6    14        ECHO                                                     '%0A'
    7    15        INIT_FCALL                                               'str_ireplace'
         16        SEND_VAR                                                 !0
         17        SEND_VAR                                                 !0
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $8      
         20        ECHO                                                     $8
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.7 ms | 1386 KiB | 19 Q