3v4l.org

run code in 300+ PHP versions simultaneously
<?php $line = str_repeat(' ',20); $value ='03'; $pos=0; $len='2'; $line = substr_replace($line,$value,$pos,$len); echo "[$line]\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/svDrE
function name:  (null)
number of ops:  20
compiled vars:  !0 = $line, !1 = $value, !2 = $pos, !3 = $len
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 '+'
          2        SEND_VAL                                                 20
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
          5        ASSIGN                                                   !1, '03'
          6        ASSIGN                                                   !2, 0
          7        ASSIGN                                                   !3, '2'
    3     8        INIT_FCALL                                               'substr_replace'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        SEND_VAR                                                 !2
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                         $9      
         14        ASSIGN                                                   !0, $9
    4    15        ROPE_INIT                                     3  ~12     '%5B'
         16        ROPE_ADD                                      1  ~12     ~12, !0
         17        ROPE_END                                      2  ~11     ~12, '%5D%0A'
         18        ECHO                                                     ~11
    5    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.66 ms | 1395 KiB | 17 Q