3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'foobarfoobarfoobarfoobar<center><a href="ciao"><img alt="" src="image.png" /></a></center>foobarfoobarfoobar!'; $image = preg_replace("/.*\<center\>\<a href=\"(.*)\"\>\<img alt=\"\" src=\"(.*)\" \/\>\<\/a\>\<\/center\>.*/", "$2", $string); echo $image;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fHCVh
function name:  (null)
number of ops:  9
compiled vars:  !0 = $string, !1 = $image
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'foobarfoobarfoobarfoobar%3Ccenter%3E%3Ca+href%3D%22ciao%22%3E%3Cimg+alt%3D%22%22+src%3D%22image.png%22+%2F%3E%3C%2Fa%3E%3C%2Fcenter%3Efoobarfoobarfoobar%21'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F.%2A%5C%3Ccenter%5C%3E%5C%3Ca+href%3D%22%28.%2A%29%22%5C%3E%5C%3Cimg+alt%3D%22%22+src%3D%22%28.%2A%29%22+%5C%2F%5C%3E%5C%3C%5C%2Fa%5C%3E%5C%3C%5C%2Fcenter%5C%3E.%2A%2F'
          3        SEND_VAL                                                 '%242'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    4     7        ECHO                                                     !1
          8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.32 ms | 1394 KiB | 15 Q