3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'tehdgsd f fs fsddf sdf http://mail.ru?dsdfll fdsfsd'; if (preg_match_all("/(https?:\/\/[^\s]+)/", $text, $m)) { echo trim($matches[0][0]); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/7DMZD
function name:  (null)
number of ops:  14
compiled vars:  !0 = $text, !1 = $m, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'tehdgsd+f+fs+fsddf+sdf+http%3A%2F%2Fmail.ru%3Fdsdfll+fdsfsd'
    3     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%28https%3F%3A%5C%2F%5C%2F%5B%5E%5Cs%5D%2B%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $4      
          6      > JMPZ                                                     $4, ->13
          7    >   INIT_FCALL                                               'trim'
          8        FETCH_DIM_R                                      ~5      !2, 0
          9        FETCH_DIM_R                                      ~6      ~5, 0
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        ECHO                                                     $7
         13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.4 ms | 1394 KiB | 17 Q