3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "hi new image one http://xxx/images/c4ca4238a0b923820dcc509a6f75849b208754572.jpgand two arehttp://yyy/images/c1f1a611c1147c4054c399c01f8bad76686484492.jpgend"; $regex = '#https?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/)\.(jpg|jpeg))#'; preg_match_all($regex, $string, $matches); echo "<pre>"; print_r($matches[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WACo1
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string, !1 = $regex, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'hi+new+image+one+http%3A%2F%2Fxxx%2Fimages%2Fc4ca4238a0b923820dcc509a6f75849b208754572.jpgand+two+arehttp%3A%2F%2Fyyy%2Fimages%2Fc1f1a611c1147c4054c399c01f8bad76686484492.jpgend'
    4     1        ASSIGN                                                   !1, '%23https%3F%3A%2F%2F%5B%5E%2C%5Cs%28%29%3C%3E%5D%2B%28%3F%3A%5C%28%5B%5Cw%5Cd%5D%2B%5C%29%7C%28%5B%5E%2C%5B%3Apunct%3A%5D%5Cs%5D%7C%2F%29%5C.%28jpg%7Cjpeg%29%29%23'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    6     7        ECHO                                                     '%3Cpre%3E'
    7     8        INIT_FCALL                                               'print_r'
          9        FETCH_DIM_R                                      ~6      !2, 0
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.89 ms | 1005 KiB | 15 Q