3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str1 = '/P-36396-0-A1-stephan-regis-eurl.html'; $str2 = '/stephan-regis-eurl.html'; $str3 = '/stephan-regis-eurl'; $str4 = '/stephan-regis-eurl.html?modif_ok=1'; echo preg_match("#^/([A-Z0-9\-]*\-)?.*(\.html)?^(\?.*)$#", $str1); echo preg_match("#^/([A-Z0-9\-]*\-)?.*(\.html)?^(\?.*)$#", $str2); echo preg_match("#^/([A-Z0-9\-]*\-)?.*(\.html)?^(\?.*)$#", $str3); echo preg_match("#^/([A-Z0-9\-]*\-)?.*(\.html)?^(\?.*)$#", $str4); echo "\n"; echo preg_match("#^/([A-Z0-9\-]*\-)?.*(\.html)?^(?.*)$#", $str2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/baZMr
function name:  (null)
number of ops:  31
compiled vars:  !0 = $str1, !1 = $str2, !2 = $str3, !3 = $str4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2FP-36396-0-A1-stephan-regis-eurl.html'
    3     1        ASSIGN                                                   !1, '%2Fstephan-regis-eurl.html'
    4     2        ASSIGN                                                   !2, '%2Fstephan-regis-eurl'
    5     3        ASSIGN                                                   !3, '%2Fstephan-regis-eurl.html%3Fmodif_ok%3D1'
    6     4        INIT_FCALL                                               'preg_match'
          5        SEND_VAL                                                 '%23%5E%2F%28%5BA-Z0-9%5C-%5D%2A%5C-%29%3F.%2A%28%5C.html%29%3F%5E%28%5C%3F.%2A%29%24%23'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $8      
          8        ECHO                                                     $8
    7     9        INIT_FCALL                                               'preg_match'
         10        SEND_VAL                                                 '%23%5E%2F%28%5BA-Z0-9%5C-%5D%2A%5C-%29%3F.%2A%28%5C.html%29%3F%5E%28%5C%3F.%2A%29%24%23'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13        ECHO                                                     $9
    8    14        INIT_FCALL                                               'preg_match'
         15        SEND_VAL                                                 '%23%5E%2F%28%5BA-Z0-9%5C-%5D%2A%5C-%29%3F.%2A%28%5C.html%29%3F%5E%28%5C%3F.%2A%29%24%23'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $10     
         18        ECHO                                                     $10
    9    19        INIT_FCALL                                               'preg_match'
         20        SEND_VAL                                                 '%23%5E%2F%28%5BA-Z0-9%5C-%5D%2A%5C-%29%3F.%2A%28%5C.html%29%3F%5E%28%5C%3F.%2A%29%24%23'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                         $11     
         23        ECHO                                                     $11
   10    24        ECHO                                                     '%0A'
   11    25        INIT_FCALL                                               'preg_match'
         26        SEND_VAL                                                 '%23%5E%2F%28%5BA-Z0-9%5C-%5D%2A%5C-%29%3F.%2A%28%5C.html%29%3F%5E%28%3F.%2A%29%24%23'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $12     
         29        ECHO                                                     $12
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.95 ms | 1388 KiB | 15 Q