3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cloneXML = 'Blabla blabla ${bâtiment} : blabla'; $i = 42; print preg_replace('/\$\{(\w*)\}/u', '{${1}' . $i . '}', $cloneXML);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k8mIQ
function name:  (null)
number of ops:  11
compiled vars:  !0 = $cloneXML, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Blabla+blabla+%24%7Bb%C3%A2timent%7D+%3A+blabla'
    4     1        ASSIGN                                                   !1, 42
    6     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2F%5C%24%5C%7B%28%5Cw%2A%29%5C%7D%2Fu'
          4        CONCAT                                           ~4      '%7B%24%7B1%7D', !1
          5        CONCAT                                           ~5      ~4, '%7D'
          6        SEND_VAL                                                 ~5
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        ECHO                                                     $6
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
246.37 ms | 1000 KiB | 14 Q