3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text_string = '+TEST+'; $text = explode("+", $text_string); $text = $text[1]; $replaced_text = str_replace("+$text+", "<em>$text</em>", $text_string); echo $replaced_text; // output: <em>TEST</em> ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h4fuL
function name:  (null)
number of ops:  22
compiled vars:  !0 = $text_string, !1 = $text, !2 = $replaced_text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2BTEST%2B'
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2B'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    4     6        FETCH_DIM_R                                      ~6      !1, 1
          7        ASSIGN                                                   !1, ~6
    5     8        INIT_FCALL                                               'str_replace'
          9        ROPE_INIT                                     3  ~9      '%2B'
         10        ROPE_ADD                                      1  ~9      ~9, !1
         11        ROPE_END                                      2  ~8      ~9, '%2B'
         12        SEND_VAL                                                 ~8
         13        ROPE_INIT                                     3  ~12     '%3Cem%3E'
         14        ROPE_ADD                                      1  ~12     ~12, !1
         15        ROPE_END                                      2  ~11     ~12, '%3C%2Fem%3E'
         16        SEND_VAL                                                 ~11
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $14     
         19        ASSIGN                                                   !2, $14
    6    20        ECHO                                                     !2
    8    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.58 ms | 1395 KiB | 17 Q