3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('1 ½ cups','¼ cup','2 tablespoons', '½ cup', '1/3 cup', '2 large', '1 ½ teaspoons', '2 tablespoons', 'Large egg', '1 teaspoon', '¼ teaspoon'); foreach($array as $arr){ preg_match_all("/^(?:[\p{Pd}.\/\s-]*[\d↉½⅓⅔¼¾⅕⅖⅗⅘⅙⅚⅐⅛⅜⅝⅞⅑⅒⅟]|)+/um", $arr, $output); foreach($output[0] as $data){ $try[] = $data; } } var_dump($try);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 16
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 14
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/hMW8l
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array, !1 = $arr, !2 = $output, !3 = $data, !4 = $try
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_R                                       $6      !0, ->16
          2    > > FE_FETCH_R                                               $6, !1, ->16
    6     3    >   INIT_FCALL                                               'preg_match_all'
          4        SEND_VAL                                                 '%2F%5E%28%3F%3A%5B%5Cp%7BPd%7D.%5C%2F%5Cs-%5D%2A%5B%5Cd%E2%86%89%C2%BD%E2%85%93%E2%85%94%C2%BC%C2%BE%E2%85%95%E2%85%96%E2%85%97%E2%85%98%E2%85%99%E2%85%9A%E2%85%90%E2%85%9B%E2%85%9C%E2%85%9D%E2%85%9E%E2%85%91%E2%85%92%E2%85%9F%5D%7C%29%2B%2Fum'
          5        SEND_VAR                                                 !1
          6        SEND_REF                                                 !2
          7        DO_ICALL                                                 
    7     8        FETCH_DIM_R                                      ~8      !2, 0
          9      > FE_RESET_R                                       $9      ~8, ->14
         10    > > FE_FETCH_R                                               $9, !3, ->14
    8    11    >   ASSIGN_DIM                                               !4
         12        OP_DATA                                                  !3
    7    13      > JMP                                                      ->10
         14    >   FE_FREE                                                  $9
    5    15      > JMP                                                      ->2
         16    >   FE_FREE                                                  $6
   11    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !4
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.8 ms | 1400 KiB | 17 Q