3v4l.org

run code in 300+ PHP versions simultaneously
<?php $appt_notes = "Packet emailed 09-26-2014 14:21:47"; preg_match_all("/Packet (e{0,1}mailed) \d{4}-(\d{2}-\d{2})/i",$appt_notes,$matches,PREG_SET_ORDER); if (!empty($matches)) { $packet_sentby = $matches[count($matches)-1][1]; $packet_date = $matches[count($matches)-1][2]; } else { $packet_sentby = ""; $packet_date = ""; } echo "Notes = $appt_notes <br>\n<br>\n"; echo $packet_sentby . "<br>\n" . $packet_date; echo "<hr>\n"; print_r($matches); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Sl9k3
function name:  (null)
number of ops:  35
compiled vars:  !0 = $appt_notes, !1 = $matches, !2 = $packet_sentby, !3 = $packet_date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Packet+emailed+09-26-2014+14%3A21%3A47'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2FPacket+%28e%7B0%2C1%7Dmailed%29+%5Cd%7B4%7D-%28%5Cd%7B2%7D-%5Cd%7B2%7D%29%2Fi'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        SEND_VAL                                                 2
          6        DO_ICALL                                                 
    5     7        ISSET_ISEMPTY_CV                                 ~6      !1
          8        BOOL_NOT                                         ~7      ~6
          9      > JMPZ                                                     ~7, ->21
    7    10    >   COUNT                                            ~8      !1
         11        SUB                                              ~9      ~8, 1
         12        FETCH_DIM_R                                      ~10     !1, ~9
         13        FETCH_DIM_R                                      ~11     ~10, 1
         14        ASSIGN                                                   !2, ~11
    8    15        COUNT                                            ~13     !1
         16        SUB                                              ~14     ~13, 1
         17        FETCH_DIM_R                                      ~15     !1, ~14
         18        FETCH_DIM_R                                      ~16     ~15, 2
         19        ASSIGN                                                   !3, ~16
         20      > JMP                                                      ->23
   10    21    >   ASSIGN                                                   !2, ''
   11    22        ASSIGN                                                   !3, ''
   14    23    >   ROPE_INIT                                     3  ~21     'Notes+%3D+'
         24        ROPE_ADD                                      1  ~21     ~21, !0
         25        ROPE_END                                      2  ~20     ~21, '+%3Cbr%3E%0A%3Cbr%3E%0A'
         26        ECHO                                                     ~20
   15    27        CONCAT                                           ~23     !2, '%3Cbr%3E%0A'
         28        CONCAT                                           ~24     ~23, !3
         29        ECHO                                                     ~24
   16    30        ECHO                                                     '%3Chr%3E%0A'
   19    31        INIT_FCALL                                               'print_r'
         32        SEND_VAR                                                 !1
         33        DO_ICALL                                                 
   21    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.11 ms | 1396 KiB | 17 Q