3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $article = '<img src="http://php.net/images/logo.php">'; $match = preg_match( // Match the src attribute with the opening quote. '/src=(?\'quote\'["\'])' // Match the URL for the image. . '([\S\s]+?)\.(png|gif|jpeg)' // Re-use the opening quote as closing quote. . '(?P=quote)/m', $article, $matches ); var_dump($match, $matches);
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/W1HRk
function name:  (null)
number of ops:  12
compiled vars:  !0 = $article, !1 = $match, !2 = $matches
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, '%3Cimg+src%3D%22http%3A%2F%2Fphp.net%2Fimages%2Flogo.php%22%3E'
   4     1        INIT_FCALL                                               'preg_match'
  10     2        SEND_VAL                                                 '%2Fsrc%3D%28%3F%27quote%27%5B%22%27%5D%29%28%5B%5CS%5Cs%5D%2B%3F%29%5C.%28png%7Cgif%7Cjpeg%29%28%3FP%3Dquote%29%2Fm'
         3        SEND_VAR                                                 !0
         4        SEND_REF                                                 !2
         5        DO_ICALL                                         $4      
         6        ASSIGN                                                   !1, $4
  15     7        INIT_FCALL                                               'var_dump'
         8        SEND_VAR                                                 !1
         9        SEND_VAR                                                 !2
        10        DO_ICALL                                                 
        11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0