3v4l.org

run code in 500+ PHP versions simultaneously
<?php $examples = [ 'Sep 04-08', 'Sep 29-Oct 01', ]; $result = []; foreach ($examples as $example) { var_export( explode('-', preg_replace('/^(\D{4})\d{2}-\K(?=\d)/', '$1', $example)) ); echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/scfSF
function name:  (null)
number of ops:  17
compiled vars:  !0 = $examples, !1 = $result, !2 = $example
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    8     1        ASSIGN                                                       !1, <array>
    9     2      > FE_RESET_R                                           $5      !0, ->15
          3    > > FE_FETCH_R                                                   $5, !2, ->15
   10     4    >   INIT_FCALL                                                   'var_export'
   11     5        INIT_FCALL                                                   'explode'
          6        SEND_VAL                                                     '-'
          7        FRAMELESS_ICALL_3                preg_replace        ~6      '%2F%5E%28%5CD%7B4%7D%29%5Cd%7B2%7D-%5CK%28%3F%3D%5Cd%29%2F', '%241'
          8        OP_DATA                                                      !2
          9        SEND_VAL                                                     ~6
         10        DO_ICALL                                             $7      
         11        SEND_VAR                                                     $7
   10    12        DO_ICALL                                                     
   13    13        ECHO                                                         '%0A'
    9    14      > JMP                                                          ->3
         15    >   FE_FREE                                                      $5
   14    16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.79 ms | 1896 KiB | 15 Q