3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '~(?:<p>(?=[^<>]*</p>)|\G(?!^))[^\d<>]*\d+\K\h~'; $str = '<p>My 90 days 123 work.</p>'; echo preg_replace($re, "&nbsp", $str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aTntK
function name:  (null)
number of ops:  9
compiled vars:  !0 = $re, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7E%28%3F%3A%3Cp%3E%28%3F%3D%5B%5E%3C%3E%5D%2A%3C%2Fp%3E%29%7C%5CG%28%3F%21%5E%29%29%5B%5E%5Cd%3C%3E%5D%2A%5Cd%2B%5CK%5Ch%7E'
    4     1        ASSIGN                                                   !1, '%3Cp%3EMy+90+days+123+work.%3C%2Fp%3E'
    6     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '%26nbsp'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $4      
          7        ECHO                                                     $4
          8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.4 ms | 996 KiB | 14 Q