3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "\/(?<backendLanguage>\w{2})\/?((?<frontendLanguage>\w{2})\/?)?\/?((?<cooperation>\w+)\/?)?/"; $sample = 'tyre24.dev/de/de'; 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/C6PiZ
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, '%5C%2F%28%3F%3CbackendLanguage%3E%5Cw%7B2%7D%29%5C%2F%3F%28%28%3F%3CfrontendLanguage%3E%5Cw%7B2%7D%29%5C%2F%3F%29%3F%5C%2F%3F%28%28%3F%3Ccooperation%3E%5Cw%2B%29%5C%2F%3F%29%3F%2F'
    3     1        ASSIGN                                                   !1, 'tyre24.dev%2Fde%2Fde'
    4     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
    5    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:
169 ms | 1394 KiB | 17 Q