3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 'label' => 'Evening', 'hour' => 15, 'minute' => 00, 'add_time' => 'enabled', 'zlzkrrwlwchehhtvdnmq_add_date' => '29 November 2022', 'zlzkrrwlwchehhtvdnmq_zoom_id' => null, 'zlzkrrwlwchehhtvdnmq_stock' => null, 'sfujorleiwijcczciess_add_date' => '30 November 2022', ); $pt = '/add_date$|hour$|minute$/'; foreach ($data as $key => $value){ $match = preg_match($pt, $key); if (!$match) { unset($data[$key]); } } print_r($data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/oKTeT
function name:  (null)
number of ops:  19
compiled vars:  !0 = $data, !1 = $pt, !2 = $value, !3 = $key, !4 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        ASSIGN                                                   !1, '%2Fadd_date%24%7Chour%24%7Cminute%24%2F'
   16     2      > FE_RESET_R                                       $7      !0, ->14
          3    > > FE_FETCH_R                                       ~8      $7, !2, ->14
          4    >   ASSIGN                                                   !3, ~8
   17     5        INIT_FCALL                                               'preg_match'
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !3
          8        DO_ICALL                                         $10     
          9        ASSIGN                                                   !4, $10
   19    10        BOOL_NOT                                         ~12     !4
         11      > JMPZ                                                     ~12, ->13
   20    12    >   UNSET_DIM                                                !0, !3
   16    13    > > JMP                                                      ->3
         14    >   FE_FREE                                                  $7
   24    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.42 ms | 998 KiB | 15 Q