3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div class="whatever col-md-5 etc">foo</div>'; $regex = '#col-md-5#'; $html = preg_replace($regex, 'col-md-12', $html); echo $html;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DWZap
function name:  (null)
number of ops:  10
compiled vars:  !0 = $html, !1 = $regex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cdiv+class%3D%22whatever+col-md-5+etc%22%3Efoo%3C%2Fdiv%3E'
    4     1        ASSIGN                                                   !1, '%23col-md-5%23'
    5     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 'col-md-12'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
    6     8        ECHO                                                     !0
    7     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.14 ms | 1394 KiB | 15 Q