3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'SELECT * FROM site_customers LEFT JOIN site_products'; $pattern = '/\bsite_[a-zA-Z]*/'; $replacement = '$0_02'; echo preg_replace($pattern, $replacement, $string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ti7n4
function name:  (null)
number of ops:  10
compiled vars:  !0 = $string, !1 = $pattern, !2 = $replacement
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'SELECT+%2A+FROM+site_customers+LEFT+JOIN+site_products'
    5     1        ASSIGN                                                   !1, '%2F%5Cbsite_%5Ba-zA-Z%5D%2A%2F'
    7     2        ASSIGN                                                   !2, '%240_02'
    9     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        ECHO                                                     $6
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.19 ms | 1003 KiB | 14 Q