3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "Family: peppers, dimensions: 150 cm, origin: South America, pot diameter: 14, height with pot: 80"; $output = preg_replace("/pot diameter: [0-9]+/", '\0 cm.', $input); var_dump($output);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mpCvp
function name:  (null)
number of ops:  11
compiled vars:  !0 = $input, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Family%3A+peppers%2C+dimensions%3A+150+cm%2C+origin%3A+South+America%2C+pot+diameter%3A+14%2C+height+with+pot%3A+80'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2Fpot+diameter%3A+%5B0-9%5D%2B%2F'
          3        SEND_VAL                                                 '%5C0+cm.'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    4     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.28 ms | 1394 KiB | 17 Q