3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ [ 'a' => '12-02-1972', 'b' => 'bleh' ], [ 'a' => '2011-11-11', 'b' => 'bleh' ], [ 'a' => '12-12-1922', 'b' => 'bleh' ] ]; foreach($data as $k=>$v){ foreach($v as $key =>$val){ if (preg_match("/^(((0[13578]|1[02])\/(0[1-9]|[12]\d|3[01])\/((19|[2-9]\d)\d{2}))|((0[13456789]|1[012])\/(0[1-9]|[12]\d|30)\/((19|[2-9]\d)\d{2}))|(02\/(0[1-9]|1\d|2[0-8])\/((19|[2-9]\d)\d{2}))|(02\/29\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$/",$val)) { echo "match!"; preg_replace("/^(((0[13578]|1[02])\/(0[1-9]|[12]\d|3[01])\/((19|[2-9]\d)\d{2}))|((0[13456789]|1[012])\/(0[1-9]|[12]\d|30)\/((19|[2-9]\d)\d{2}))|(02\/(0[1-9]|1\d|2[0-8])\/((19|[2-9]\d)\d{2}))|(02\/29\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$/", "/^((((19|[2-9]\d)\d{2})\/(0[13578]|1[02])\/(0[1-9]|[12]\d|3[01]))|(((19|[2-9]\d)\d{2})\/(0[13456789]|1[012])\/(0[1-9]|[12]\d|30))|(((19|[2-9]\d)\d{2})\/02\/(0[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))\/02\/29))$/",$val); } } } print_r($v); echo $v .'<br>';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 21
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 18
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 19
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/QSaSI
function name:  (null)
number of ops:  28
compiled vars:  !0 = $data, !1 = $v, !2 = $k, !3 = $val, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   19     1      > FE_RESET_R                                       $6      !0, ->21
          2    > > FE_FETCH_R                                       ~7      $6, !1, ->21
          3    >   ASSIGN                                                   !2, ~7
   21     4      > FE_RESET_R                                       $9      !1, ->19
          5    > > FE_FETCH_R                                       ~10     $9, !3, ->19
          6    >   ASSIGN                                                   !4, ~10
   24     7        INIT_FCALL                                               'preg_match'
          8        SEND_VAL                                                 '%2F%5E%28%28%280%5B13578%5D%7C1%5B02%5D%29%5C%2F%280%5B1-9%5D%7C%5B12%5D%5Cd%7C3%5B01%5D%29%5C%2F%28%2819%7C%5B2-9%5D%5Cd%29%5Cd%7B2%7D%29%29%7C%28%280%5B13456789%5D%7C1%5B012%5D%29%5C%2F%280%5B1-9%5D%7C%5B12%5D%5Cd%7C30%29%5C%2F%28%2819%7C%5B2-9%5D%5Cd%29%5Cd%7B2%7D%29%29%7C%2802%5C%2F%280%5B1-9%5D%7C1%5Cd%7C2%5B0-8%5D%29%5C%2F%28%2819%7C%5B2-9%5D%5Cd%29%5Cd%7B2%7D%29%29%7C%2802%5C%2F29%5C%2F%28%281%5B6-9%5D%7C%5B2-9%5D%5Cd%29%280%5B48%5D%7C%5B2468%5D%5B048%5D%7C%5B13579%5D%5B26%5D%29%7C%28%2816%7C%5B2468%5D%5B048%5D%7C%5B3579%5D%5B26%5D%2900%29%29%29%29%24%2F'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                         $12     
         11      > JMPZ                                                     $12, ->18
   26    12    >   ECHO                                                     'match%21'
   28    13        INIT_FCALL                                               'preg_replace'
         14        SEND_VAL                                                 '%2F%5E%28%28%280%5B13578%5D%7C1%5B02%5D%29%5C%2F%280%5B1-9%5D%7C%5B12%5D%5Cd%7C3%5B01%5D%29%5C%2F%28%2819%7C%5B2-9%5D%5Cd%29%5Cd%7B2%7D%29%29%7C%28%280%5B13456789%5D%7C1%5B012%5D%29%5C%2F%280%5B1-9%5D%7C%5B12%5D%5Cd%7C30%29%5C%2F%28%2819%7C%5B2-9%5D%5Cd%29%5Cd%7B2%7D%29%29%7C%2802%5C%2F%280%5B1-9%5D%7C1%5Cd%7C2%5B0-8%5D%29%5C%2F%28%2819%7C%5B2-9%5D%5Cd%29%5Cd%7B2%7D%29%29%7C%2802%5C%2F29%5C%2F%28%281%5B6-9%5D%7C%5B2-9%5D%5Cd%29%280%5B48%5D%7C%5B2468%5D%5B048%5D%7C%5B13579%5D%5B26%5D%29%7C%28%2816%7C%5B2468%5D%5B048%5D%7C%5B3579%5D%5B26%5D%2900%29%29%29%29%24%2F'
   29    15        SEND_VAL                                                 '%2F%5E%28%28%28%2819%7C%5B2-9%5D%5Cd%29%5Cd%7B2%7D%29%5C%2F%280%5B13578%5D%7C1%5B02%5D%29%5C%2F%280%5B1-9%5D%7C%5B12%5D%5Cd%7C3%5B01%5D%29%29%7C%28%28%2819%7C%5B2-9%5D%5Cd%29%5Cd%7B2%7D%29%5C%2F%280%5B13456789%5D%7C1%5B012%5D%29%5C%2F%280%5B1-9%5D%7C%5B12%5D%5Cd%7C30%29%29%7C%28%28%2819%7C%5B2-9%5D%5Cd%29%5Cd%7B2%7D%29%5C%2F02%5C%2F%280%5B1-9%5D%7C1%5Cd%7C2%5B0-8%5D%29%29%7C%28%28%281%5B6-9%5D%7C%5B2-9%5D%5Cd%29%280%5B48%5D%7C%5B2468%5D%5B048%5D%7C%5B13579%5D%5B26%5D%29%7C%28%2816%7C%5B2468%5D%5B048%5D%7C%5B3579%5D%5B26%5D%2900%29%29%5C%2F02%5C%2F29%29%29%24%2F'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
   21    18    > > JMP                                                      ->5
         19    >   FE_FREE                                                  $9
   19    20      > JMP                                                      ->2
         21    >   FE_FREE                                                  $6
   36    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
   37    25        CONCAT                                           ~15     !1, '%3Cbr%3E'
         26        ECHO                                                     ~15
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.87 ms | 1400 KiB | 19 Q