3v4l.org

run code in 300+ PHP versions simultaneously
<?php $badge = '<img src="www.pampy.de" />'; if(is_string($badge)) { // Try to parse the html code to get the url preg_match('/src="([^\s"]+)/', $badge, $matches); if(is_array($matches) && count($matches) > 0) { echo $matches[0]; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 13
Branch analysis from position: 16
filename:       /in/KnNZ9
function name:  (null)
number of ops:  17
compiled vars:  !0 = $badge, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cimg+src%3D%22www.pampy.de%22+%2F%3E'
    3     1        TYPE_CHECK                                   64          !0
          2      > JMPZ                                                     ~3, ->16
    5     3    >   INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2Fsrc%3D%22%28%5B%5E%5Cs%22%5D%2B%29%2F'
          5        SEND_VAR                                                 !0
          6        SEND_REF                                                 !1
          7        DO_ICALL                                                 
    6     8        TYPE_CHECK                                  128  ~5      !1
          9      > JMPZ_EX                                          ~5      ~5, ->13
         10    >   COUNT                                            ~6      !1
         11        IS_SMALLER                                       ~7      0, ~6
         12        BOOL                                             ~5      ~7
         13    > > JMPZ                                                     ~5, ->16
    7    14    >   FETCH_DIM_R                                      ~8      !1, 0
         15        ECHO                                                     ~8
    9    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.67 ms | 1395 KiB | 15 Q