3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = '--ACT-- active --INA-- inactive user --EDI-- Banned user'; $text = str_replace(array('--ACT--','--INA--','--EDI--','%%'), array('<div class="wp"><b>1</b>','%%<div class="wp"><b>2</b>','%%<div class="wp"><b>3</b>','</div>'), $text.'%%'); print $text; //prints: <div class="wp"><b>1</b> active </div><div class="wp"><b>2</b> inactive user </div><div class="wp"><b>3</b> Banned user</div>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lj6ct
function name:  (null)
number of ops:  10
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '--ACT--+active+--INA--+inactive+user+--EDI--+Banned+user'
    4     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 <array>
          4        CONCAT                                           ~2      !0, '%25%25'
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
    5     8        ECHO                                                     !0
    6     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.82 ms | 1008 KiB | 14 Q