3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/ (?x) # free-spacing modifier ^ # start of the line [[:space:][:punct:]]* # ignore any leading trash (?P<street>[[:alpha:][:space:]]+[[:alpha:]]) # street name (any letter from any language) [[:space:][:punct:]]* # separator (?P<house> # house group [[:digit:]] # must start with the digit [[:digit:][:alpha:][:space:][:punct:]]* # any continue with digit, letter, space or punctuation (if necessary) ) [[:space:][:punct:]]* # ignore any trailing trash (not working) $ # end of the line /u'; $sample = 'Potsdamer Strae 124-126'; echo (int)preg_match( $pattern, $sample, $matches).PHP_EOL; print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/POVMK
function name:  (null)
number of ops:  14
compiled vars:  !0 = $pattern, !1 = $sample, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2F%0A%28%3Fx%29++++++++++++++++++++++++++++++++++++%23+free-spacing+modifier%0A%5E+++++++++++++++++++++++++++++++++++++++%23+start+of+the+line%0A%5B%5B%3Aspace%3A%5D%5B%3Apunct%3A%5D%5D%2A+++++++++++++++++++%23+ignore+any+leading+trash%0A%28%3FP%3Cstreet%3E%5B%5B%3Aalpha%3A%5D%5B%3Aspace%3A%5D%5D%2B%5B%5B%3Aalpha%3A%5D%5D%29++++++++%23+street+name+%28any+letter+from+any+language%29%0A%5B%5B%3Aspace%3A%5D%5B%3Apunct%3A%5D%5D%2A+++++++++++++++++++%23+separator%0A%28%3FP%3Chouse%3E++++++++++++++++++++++++++++++%23+house+group%0A++%5B%5B%3Adigit%3A%5D%5D+++++++++++++++++++++++++++++++%23+must+start+with+the+digit%0A++%5B%5B%3Adigit%3A%5D%5B%3Aalpha%3A%5D%5B%3Aspace%3A%5D%5B%3Apunct%3A%5D%5D%2A+++++++++%23+any+continue+with+digit%2C+letter%2C+space+or+punctuation+%28if+necessary%29%0A%29%0A%5B%5B%3Aspace%3A%5D%5B%3Apunct%3A%5D%5D%2A+++++++++++++++++++%23+ignore+any+trailing+trash+%28not+working%29%0A%24+++++++++++++++++++++++++++++++++++++++%23+end+of+the+line%0A%2Fu'
   16     1        ASSIGN                                                   !1, 'Potsdamer+Strae+124-126'
   17     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                         $5      
          7        CAST                                          4  ~6      $5
          8        CONCAT                                           ~7      ~6, '%0A'
          9        ECHO                                                     ~7
   18    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.43 ms | 1395 KiB | 17 Q