3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(?!^)\b(?=[0-9]+g|A handful)/'; $str = '35g walnut halves A handful of thyme leaves 200g portobello mushrooms 200g white mushrooms 200g chifferini pasta 100g Petit Brebis sheep\'s cheese 40g honey'; print_r(preg_split($re, $str));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KUTTZ
function name:  (null)
number of ops:  10
compiled vars:  !0 = $re, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%28%3F%21%5E%29%5Cb%28%3F%3D%5B0-9%5D%2Bg%7CA+handful%29%2F'
    4     1        ASSIGN                                                   !1, '35g+walnut+halves+A+handful+of+thyme+leaves+200g+portobello+mushrooms+200g+white+mushrooms+200g+chifferini+pasta+100g+Petit+Brebis+sheep%27s+cheese+40g+honey'
    5     2        INIT_FCALL                                               'print_r'
          3        INIT_FCALL                                               'preg_split'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.25 ms | 1010 KiB | 15 Q