3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '919191911'; $pattern = '(\\d)(?=(\\d{3})+$)'; $replacement = '$1$4 $2$3$5'; echo preg_replace($pattern, $replacement, $string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YERS8
function name:  (null)
number of ops:  10
compiled vars:  !0 = $string, !1 = $pattern, !2 = $replacement
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '919191911'
    3     1        ASSIGN                                                   !1, '%28%5Cd%29%28%3F%3D%28%5Cd%7B3%7D%29%2B%24%29'
    4     2        ASSIGN                                                   !2, '%241%244+%242%243%245'
    5     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:
150.17 ms | 1394 KiB | 15 Q