3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '100 grams almonds (preferrably raw) && 1 egg'; var_export( preg_match_all( '/\w+(?: && \d+| \([^)]+\))*/', $string, $m ) ? $m[0] : [] );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UaVHh
function name:  (null)
number of ops:  15
compiled vars:  !0 = $string, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '100+grams+almonds+%28preferrably+raw%29+%26%26+1+egg'
    5     1        INIT_FCALL                                               'var_export'
    6     2        INIT_FCALL                                               'preg_match_all'
    7     3        SEND_VAL                                                 '%2F%5Cw%2B%28%3F%3A+%26%26+%5Cd%2B%7C+%5C%28%5B%5E%29%5D%2B%5C%29%29%2A%2F'
    8     4        SEND_VAR                                                 !0
    9     5        SEND_REF                                                 !1
          6        DO_ICALL                                         $3      
          7      > JMPZ                                                     $3, ->11
   11     8    >   FETCH_DIM_R                                      ~4      !1, 0
          9        QM_ASSIGN                                        ~5      ~4
         10      > JMP                                                      ->12
   12    11    >   QM_ASSIGN                                        ~5      <array>
         12    >   SEND_VAL                                                 ~5
         13        DO_ICALL                                                 
   13    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.97 ms | 1394 KiB | 17 Q