3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Patient will come in earlier\n\nPacket emailed 2012-06-14 11:30:06\n\nPacket emailed 2012-06-12 12:32:04"; $pattern = "/packet (e{0,1}mailed) \d{4}-(\d{2}-\d{2})/i"; preg_match_all($pattern,$string,$matches,PREG_SET_ORDER); print_r($matches[count($matches)-1]); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b03Xj
function name:  (null)
number of ops:  15
compiled vars:  !0 = $string, !1 = $pattern, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Patient+will+come+in+earlier%0A%0APacket+emailed+2012-06-14+11%3A30%3A06%0A%0APacket+emailed+2012-06-12+12%3A32%3A04'
    4     1        ASSIGN                                                   !1, '%2Fpacket+%28e%7B0%2C1%7Dmailed%29+%5Cd%7B4%7D-%28%5Cd%7B2%7D-%5Cd%7B2%7D%29%2Fi'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        SEND_VAL                                                 2
          7        DO_ICALL                                                 
    8     8        INIT_FCALL                                               'print_r'
          9        COUNT                                            ~6      !2
         10        SUB                                              ~7      ~6, 1
         11        FETCH_DIM_R                                      ~8      !2, ~7
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                                 
   10    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.06 ms | 1398 KiB | 18 Q