3v4l.org

run code in 300+ PHP versions simultaneously
<?php $prices = array( "Red Pants" => 20, "Black Hats" => 15); $items = "8 Red Pants, 2 Shirts, 6 Black Hats"; preg_match_all("/(?:(\d+) ([\w ])+,?)+/", $items, $matches); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pvlUr
function name:  (null)
number of ops:  11
compiled vars:  !0 = $prices, !1 = $items, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, '8+Red+Pants%2C+2+Shirts%2C+6+Black+Hats'
    6     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%28%3F%3A%28%5Cd%2B%29+%28%5B%5Cw+%5D%29%2B%2C%3F%29%2B%2F'
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.72 ms | 1394 KiB | 17 Q