3v4l.org

run code in 300+ PHP versions simultaneously
<?php $examples = [ 'Sep 04-08', 'Sep 29-Oct 01', ]; $result = []; foreach ($examples as $example) { [$from, $to] = explode('-', $example, 2); var_export([$from, str_pad($to, 6, $from, STR_PAD_LEFT)]); echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 27
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 27
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/MU87N
function name:  (null)
number of ops:  29
compiled vars:  !0 = $examples, !1 = $result, !2 = $example, !3 = $from, !4 = $to
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                                       $7      !0, ->27
          3    > > FE_FETCH_R                                               $7, !2, ->27
   10     4    >   INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '-'
          6        SEND_VAR                                                 !2
          7        SEND_VAL                                                 2
          8        DO_ICALL                                         $8      
          9        FETCH_LIST_R                                     $9      $8, 0
         10        ASSIGN                                                   !3, $9
         11        FETCH_LIST_R                                     $11     $8, 1
         12        ASSIGN                                                   !4, $11
         13        FREE                                                     $8
   11    14        INIT_FCALL                                               'var_export'
         15        INIT_ARRAY                                       ~13     !3
         16        INIT_FCALL                                               'str_pad'
         17        SEND_VAR                                                 !4
         18        SEND_VAL                                                 6
         19        SEND_VAR                                                 !3
         20        SEND_VAL                                                 0
         21        DO_ICALL                                         $14     
         22        ADD_ARRAY_ELEMENT                                ~13     $14
         23        SEND_VAL                                                 ~13
         24        DO_ICALL                                                 
   12    25        ECHO                                                     '%0A'
    9    26      > JMP                                                      ->3
         27    >   FE_FREE                                                  $7
   13    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.28 ms | 1396 KiB | 19 Q