3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = "this is. an example. 15.68€"; function cleaner($matches) { return str_replace("." , "," , $matches["nrs"]); } $str = preg_replace_callback ("/(?P<nrs>[0-9]+.[0-9]+)/" , "cleaner" , $str); echo $str; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4KPXT
function name:  (null)
number of ops:  9
compiled vars:  !0 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'this+is.+an+example.+15.68%E2%82%AC'
    8     1        INIT_FCALL                                                   'preg_replace_callback'
          2        SEND_VAL                                                     '%2F%28%3FP%3Cnrs%3E%5B0-9%5D%2B.%5B0-9%5D%2B%29%2F'
          3        SEND_VAL                                                     'cleaner'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $2      
          6        ASSIGN                                                       !0, $2
    9     7        ECHO                                                         !0
   10     8      > RETURN                                                       1

Function cleaner:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4KPXT
function name:  cleaner
number of ops:  6
compiled vars:  !0 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    5     1        FETCH_DIM_R                                          ~1      !0, 'nrs'
          2        FRAMELESS_ICALL_3                str_replace         ~2      '.', '%2C'
          3        OP_DATA                                                      ~1
          4      > RETURN                                                       ~2
    6     5*     > RETURN                                                       null

End of function cleaner

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
177.69 ms | 3289 KiB | 14 Q