3v4l.org

run code in 300+ PHP versions simultaneously
<?php $haystack = '12341234'; $needle = '2'; $start = strpos($haystack , $needle); $needleLen = strlen($needle); echo substr_replace ( $haystack , '', $start , $needleLen );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OHA0u
function name:  (null)
number of ops:  17
compiled vars:  !0 = $haystack, !1 = $needle, !2 = $start, !3 = $needleLen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '12341234'
    4     1        ASSIGN                                                   !1, '2'
    5     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    7     7        STRLEN                                           ~8      !1
          8        ASSIGN                                                   !3, ~8
    8     9        INIT_FCALL                                               'substr_replace'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 ''
         12        SEND_VAR                                                 !2
         13        SEND_VAR                                                 !3
         14        DO_ICALL                                         $10     
         15        ECHO                                                     $10
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.78 ms | 1394 KiB | 17 Q