3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fileContent = '12em\n1.3 em'; preg_replace_callback('/([0-9,-\.]+)\s*(em)/', 'replace_em', $fileContent); function replace_em($value) { return $value * 123; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uRr5k
function name:  (null)
number of ops:  7
compiled vars:  !0 = $fileContent
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '12em%5Cn1.3+em'
    3     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F%28%5B0-9%2C-%5C.%5D%2B%29%5Cs%2A%28em%29%2F'
          3        SEND_VAL                                                 'replace_em'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    7     6      > RETURN                                                   1

Function replace_em:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uRr5k
function name:  replace_em
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        MUL                                              ~1      !0, 123
          2      > RETURN                                                   ~1
    7     3*     > RETURN                                                   null

End of function replace_em

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.89 ms | 1394 KiB | 15 Q