3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "Lorem ipsum random_5ac18d179707d dolor random_5ac18d179707d sit amet, consectetur random_5ac18decebd4e adipiscing elit. random_5ac18d179707d"; preg_match_all('~random_(\w+)~', $string, $m); echo strtr($string, array_combine($s = array_unique($m[1]), range(1, count($s))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ARunK
function name:  (null)
number of ops:  23
compiled vars:  !0 = $string, !1 = $m, !2 = $s
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Lorem+ipsum+random_5ac18d179707d+dolor+random_5ac18d179707d+sit+amet%2C+consectetur+random_5ac18decebd4e+adipiscing+elit.+random_5ac18d179707d'
    5     1        INIT_FCALL                                                   'preg_match_all'
          2        SEND_VAL                                                     '%7Erandom_%28%5Cw%2B%29%7E'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                                     
    6     6        INIT_FCALL                                                   'array_combine'
          7        INIT_FCALL                                                   'array_unique'
          8        FETCH_DIM_R                                          ~5      !1, 1
          9        SEND_VAL                                                     ~5
         10        DO_ICALL                                             $6      
         11        ASSIGN                                               ~7      !2, $6
         12        SEND_VAL                                                     ~7
         13        INIT_FCALL                                                   'range'
         14        SEND_VAL                                                     1
         15        COUNT                                                ~8      !2
         16        SEND_VAL                                                     ~8
         17        DO_ICALL                                             $9      
         18        SEND_VAR                                                     $9
         19        DO_ICALL                                             $10     
         20        FRAMELESS_ICALL_2                strtr               ~11     !0, $10
         21        ECHO                                                         ~11
         22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
129.08 ms | 481 KiB | 11 Q