3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = 'foo bar baz <img src="http://ak-hdl.buzzfed.com/static/2014-06/6/12/enhanced/webdr08/enhanced-21313-1402070821-11.jpg" width="500" height="1000"/> dragons and ponies.'; for ( $i = 0; $i < 1000; $i++ ) { if ( preg_match_all( '#<(?P<tag>img)[^<]*?(?:>[\s\S]*?<\/(?P=tag)>|\s*\/>)#', $content, $matches ) ) { foreach ( $matches[0] as $match ) { preg_match( '/ src="([^"]+)"/', $content, $src ); preg_match( '/ width="([0-9]+)"/', $content, $width ); preg_match( '/ height="([0-9]+)"/', $content, $height ); } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 3
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 29
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 28
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 28
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 3
Branch analysis from position: 32
Branch analysis from position: 3
Branch analysis from position: 28
Branch analysis from position: 29
filename:       /in/OpgtT
function name:  (null)
number of ops:  33
compiled vars:  !0 = $content, !1 = $i, !2 = $matches, !3 = $match, !4 = $src, !5 = $width, !6 = $height
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'foo+bar+baz+%3Cimg+src%3D%22http%3A%2F%2Fak-hdl.buzzfed.com%2Fstatic%2F2014-06%2F6%2F12%2Fenhanced%2Fwebdr08%2Fenhanced-21313-1402070821-11.jpg%22+width%3D%22500%22+height%3D%221000%22%2F%3E+dragons+and+ponies.'
    4     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->30
    6     3    >   INIT_FCALL                                               'preg_match_all'
          4        SEND_VAL                                                 '%23%3C%28%3FP%3Ctag%3Eimg%29%5B%5E%3C%5D%2A%3F%28%3F%3A%3E%5B%5Cs%5CS%5D%2A%3F%3C%5C%2F%28%3FP%3Dtag%29%3E%7C%5Cs%2A%5C%2F%3E%29%23'
          5        SEND_VAR                                                 !0
          6        SEND_REF                                                 !2
          7        DO_ICALL                                         $9      
          8      > JMPZ                                                     $9, ->29
    8     9    >   FETCH_DIM_R                                      ~10     !2, 0
         10      > FE_RESET_R                                       $11     ~10, ->28
         11    > > FE_FETCH_R                                               $11, !3, ->28
   10    12    >   INIT_FCALL                                               'preg_match'
         13        SEND_VAL                                                 '%2F+src%3D%22%28%5B%5E%22%5D%2B%29%22%2F'
         14        SEND_VAR                                                 !0
         15        SEND_REF                                                 !4
         16        DO_ICALL                                                 
   11    17        INIT_FCALL                                               'preg_match'
         18        SEND_VAL                                                 '%2F+width%3D%22%28%5B0-9%5D%2B%29%22%2F'
         19        SEND_VAR                                                 !0
         20        SEND_REF                                                 !5
         21        DO_ICALL                                                 
   12    22        INIT_FCALL                                               'preg_match'
         23        SEND_VAL                                                 '%2F+height%3D%22%28%5B0-9%5D%2B%29%22%2F'
         24        SEND_VAR                                                 !0
         25        SEND_REF                                                 !6
         26        DO_ICALL                                                 
    8    27      > JMP                                                      ->11
         28    >   FE_FREE                                                  $11
    4    29    >   PRE_INC                                                  !1
         30    >   IS_SMALLER                                               !1, 1000
         31      > JMPNZ                                                    ~16, ->3
   15    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.13 ms | 1073 KiB | 15 Q