3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div class="media_embed" height="qqq" width="www"> <a href="http://giphy.com/gifs/dancing">via GIPHY</a> <div class="media_embed" height="eee" width="rrr"> <a href="http://giphy.com/gifs/movie">via GIPHY</a>'; echo $html = preg_replace("/<a href=\"(.*)\">.*<\/a>/", "<figure><img src='$1' /></figure>", $html);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IULpA
function name:  (null)
number of ops:  9
compiled vars:  !0 = $html
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cdiv+class%3D%22media_embed%22+height%3D%22qqq%22+width%3D%22www%22%3E%0A%3Ca+href%3D%22http%3A%2F%2Fgiphy.com%2Fgifs%2Fdancing%22%3Evia+GIPHY%3C%2Fa%3E%0A%3Cdiv+class%3D%22media_embed%22+height%3D%22eee%22+width%3D%22rrr%22%3E%0A%3Ca+href%3D%22http%3A%2F%2Fgiphy.com%2Fgifs%2Fmovie%22%3Evia+GIPHY%3C%2Fa%3E'
    8     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%3Ca+href%3D%22%28.%2A%29%22%3E.%2A%3C%5C%2Fa%3E%2F'
          3        SEND_VAL                                                 '%3Cfigure%3E%3Cimg+src%3D%27%241%27+%2F%3E%3C%2Ffigure%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                           ~3      !0, $2
          7        ECHO                                                     ~3
          8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.92 ms | 1000 KiB | 14 Q