3v4l.org

run code in 300+ PHP versions simultaneously
<?php $links = [ "https://www.booking.com/hotel/it/nh-collection-venezia-palazzo-barocci.en-gb.html", "https://www.booking.com/it/nh-collection-venezia-palazzo-barocci.en-gb.html" ]; $pattern = '~^https?://.*?/hotel~'; foreach ($links as $link) { if (preg_match($pattern, $link)) { echo "Match: $link" . PHP_EOL; } else { echo "No match: $link" . PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/fkmPb
function name:  (null)
number of ops:  21
compiled vars:  !0 = $links, !1 = $pattern, !2 = $link
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, '%7E%5Ehttps%3F%3A%2F%2F.%2A%3F%2Fhotel%7E'
    9     2      > FE_RESET_R                                       $5      !0, ->19
          3    > > FE_FETCH_R                                               $5, !2, ->19
   10     4    >   INIT_FCALL                                               'preg_match'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $6      
          8      > JMPZ                                                     $6, ->14
   11     9    >   NOP                                                      
         10        FAST_CONCAT                                      ~7      'Match%3A+', !2
         11        CONCAT                                           ~8      ~7, '%0A'
         12        ECHO                                                     ~8
   10    13      > JMP                                                      ->18
   13    14    >   NOP                                                      
         15        FAST_CONCAT                                      ~9      'No+match%3A+', !2
         16        CONCAT                                           ~10     ~9, '%0A'
         17        ECHO                                                     ~10
    9    18    > > JMP                                                      ->3
         19    >   FE_FREE                                                  $5
   15    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.82 ms | 1010 KiB | 14 Q