3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '{width:100, max-heigth:300, min-height:200}'; $pattern = '/:(\S)/'; $replacement = ': $0'; var_dump(preg_replace($pattern, $replacement, $string));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6N130
function name:  (null)
number of ops:  12
compiled vars:  !0 = $string, !1 = $pattern, !2 = $replacement
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7Bwidth%3A100%2C+max-heigth%3A300%2C+min-height%3A200%7D'
    4     1        ASSIGN                                                   !1, '%2F%3A%28%5CS%29%2F'
    5     2        ASSIGN                                                   !2, '%3A+%240'
    7     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'preg_replace'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158 ms | 1394 KiB | 17 Q