3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "#^([^|]+)\|(\d+)([^|]+)\|(\d+)$#m"; $string = "Product 1|200Producht 392|150\nProduct 2|400Producht 592|250"; $matches = array(); $search = preg_match_all($pattern, $string, $matches, PREG_SET_ORDER); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z6mOK
function name:  (null)
number of ops:  14
compiled vars:  !0 = $pattern, !1 = $string, !2 = $matches, !3 = $search
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%23%5E%28%5B%5E%7C%5D%2B%29%5C%7C%28%5Cd%2B%29%28%5B%5E%7C%5D%2B%29%5C%7C%28%5Cd%2B%29%24%23m'
    3     1        ASSIGN                                                   !1, 'Product+1%7C200Producht+392%7C150%0AProduct+2%7C400Producht+592%7C250'
    5     2        ASSIGN                                                   !2, <array>
    6     3        INIT_FCALL                                               'preg_match_all'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_REF                                                 !2
          7        SEND_VAL                                                 2
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !3, $7
    7    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.2 ms | 1398 KiB | 17 Q