3v4l.org

run code in 300+ PHP versions simultaneously
<?php # str_replace($search, $replace, $subject); $search = "test.local"; $replace=""; $subject="http://test.local/too"; var_dump(str_replace($search, $replace, $subject));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uUNQq
function name:  (null)
number of ops:  12
compiled vars:  !0 = $search, !1 = $replace, !2 = $subject
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'test.local'
    5     1        ASSIGN                                                   !1, ''
    6     2        ASSIGN                                                   !2, 'http%3A%2F%2Ftest.local%2Ftoo'
    7     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'str_replace'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.35 ms | 1394 KiB | 17 Q