3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text='Hello. I have two dots. Please replace them!'; echo IHateStrReplace(".","_",$text); function IHateStrReplace($replace_from,$replace_to,$input) { $result=""; for($i=0;$i<strlen($input);$i++) { $result.= $input[$i]; } return $result; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cIOt7
function name:  (null)
number of ops:  8
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Hello.+I+have+two+dots.+Please+replace+them%21'
    5     1        INIT_FCALL_BY_NAME                                       'IHateStrReplace'
          2        SEND_VAL_EX                                              '.'
          3        SEND_VAL_EX                                              '_'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $2      
          6        ECHO                                                     $2
   17     7      > RETURN                                                   1

Function ihatestrreplace:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
Branch analysis from position: 6
filename:       /in/cIOt7
function name:  IHateStrReplace
number of ops:  14
compiled vars:  !0 = $replace_from, !1 = $replace_to, !2 = $input, !3 = $result, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    9     3        ASSIGN                                                   !3, ''
   11     4        ASSIGN                                                   !4, 0
          5      > JMP                                                      ->9
   13     6    >   FETCH_DIM_R                                      ~7      !2, !4
          7        ASSIGN_OP                                     8          !3, ~7
   11     8        PRE_INC                                                  !4
          9    >   STRLEN                                           ~10     !2
         10        IS_SMALLER                                               !4, ~10
         11      > JMPNZ                                                    ~11, ->6
   16    12    > > RETURN                                                   !3
   17    13*     > RETURN                                                   null

End of function ihatestrreplace

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.15 ms | 1394 KiB | 13 Q