3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "momo"; $new_str = substr($str, 0, 1)."aa".substr($str, 2); echo $new_str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/82eOU
function name:  (null)
number of ops:  15
compiled vars:  !0 = $str, !1 = $new_str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'momo'
    5     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $3      
          6        CONCAT                                           ~4      $3, 'aa'
          7        INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 2
         10        DO_ICALL                                         $5      
         11        CONCAT                                           ~6      ~4, $5
         12        ASSIGN                                                   !1, ~6
    7    13        ECHO                                                     !1
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.07 ms | 1385 KiB | 15 Q