3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '%(?<attr>src|href)="(?<host>.*?)(?<media>/media/[^"]+)"%i'; $content = <<<CONTENT <p><img alt="" src="/media/images/logo_medias/TV/TF1.jpg" style="height:22px; width:60px" />&nbsp;&nbsp;<img alt="" src="/media/images/logo_medias/TV/W9.jpg" style="height:22px; width:60px" />&nbsp; <img alt="" src="/media/images/logo_medias/TV/Gulli.jpg" style="height:29px; width:30px" /><strong>&nbsp;</strong><img alt="" src="/media/images/logo_medias/TV/DISNEY%20CHANNEL.jpg" style="color:rgb(76, 76, 76); font-size:15.555556297302246px; height:40px; line-height:22.986112594604492px; width:44px" /><strong>&nbsp;<img alt="" src="/media/images/logo_medias/TV/NT1.jpg" style="height:29px; width:35px" /></strong>&nbsp;-&nbsp;Campagne de spots<br /> <img alt="" src="http://infoscom.umf.dev/media/images/Pluzz.jpg" style="height:219px; width:219px" /><a alt="" href="http://infoscom.umf.dev/media/images/Pluzz.jpg" style="height:219px; width:219px" /></p> CONTENT; $matching = array(); var_dump(preg_match_all($pattern, $content, $matching)); var_dump($matching);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KgQCR
function name:  (null)
number of ops:  15
compiled vars:  !0 = $pattern, !1 = $content, !2 = $matching
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%25%28%3F%3Cattr%3Esrc%7Chref%29%3D%22%28%3F%3Chost%3E.%2A%3F%29%28%3F%3Cmedia%3E%2Fmedia%2F%5B%5E%22%5D%2B%29%22%25i'
    6     1        ASSIGN                                                   !1, '%0A%3Cp%3E%3Cimg+alt%3D%22%22+src%3D%22%2Fmedia%2Fimages%2Flogo_medias%2FTV%2FTF1.jpg%22+style%3D%22height%3A22px%3B+width%3A60px%22+%2F%3E%26nbsp%3B%26nbsp%3B%3Cimg+alt%3D%22%22+src%3D%22%2Fmedia%2Fimages%2Flogo_medias%2FTV%2FW9.jpg%22+style%3D%22height%3A22px%3B+width%3A60px%22+%2F%3E%26nbsp%3B+%3Cimg+alt%3D%22%22+src%3D%22%2Fmedia%2Fimages%2Flogo_medias%2FTV%2FGulli.jpg%22+style%3D%22height%3A29px%3B+width%3A30px%22+%2F%3E%3Cstrong%3E%26nbsp%3B%3C%2Fstrong%3E%3Cimg+alt%3D%22%22+src%3D%22%2Fmedia%2Fimages%2Flogo_medias%2FTV%2FDISNEY%2520CHANNEL.jpg%22+style%3D%22color%3Argb%2876%2C+76%2C+76%29%3B+font-size%3A15.555556297302246px%3B+height%3A40px%3B+line-height%3A22.986112594604492px%3B+width%3A44px%22+%2F%3E%3Cstrong%3E%26nbsp%3B%3Cimg+alt%3D%22%22+src%3D%22%2Fmedia%2Fimages%2Flogo_medias%2FTV%2FNT1.jpg%22+style%3D%22height%3A29px%3B+width%3A35px%22+%2F%3E%3C%2Fstrong%3E%26nbsp%3B-%26nbsp%3BCampagne+de+spots%3Cbr+%2F%3E%0A%3Cimg+alt%3D%22%22+src%3D%22http%3A%2F%2Finfoscom.umf.dev%2Fmedia%2Fimages%2FPluzz.jpg%22+style%3D%22height%3A219px%3B+width%3A219px%22+%2F%3E%3Ca+alt%3D%22%22+href%3D%22http%3A%2F%2Finfoscom.umf.dev%2Fmedia%2Fimages%2FPluzz.jpg%22+style%3D%22height%3A219px%3B+width%3A219px%22+%2F%3E%3C%2Fp%3E%0A'
   13     2        ASSIGN                                                   !2, <array>
   15     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'preg_match_all'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        SEND_REF                                                 !2
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                                 
   16    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.69 ms | 1395 KiB | 17 Q