3v4l.org

run code in 300+ PHP versions simultaneously
<?php $times = array( '7:30pm', '2:00pm', '8:00pm', ); sort($times); print_r($times); $results = array(array()); foreach ($times as $time_range) { foreach ($results as $combination) { array_push($results, array_merge(array($time_range), $combination)); } } //sort($results); print_r($results);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 24
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 24
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 22
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 22
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 22
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/vBj1i
function name:  (null)
number of ops:  29
compiled vars:  !0 = $times, !1 = $results, !2 = $time_range, !3 = $combination
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'sort'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
   10     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   12     7        ASSIGN                                                   !1, <array>
   14     8      > FE_RESET_R                                       $8      !0, ->24
          9    > > FE_FETCH_R                                               $8, !2, ->24
   15    10    > > FE_RESET_R                                       $9      !1, ->22
         11    > > FE_FETCH_R                                               $9, !3, ->22
   16    12    >   INIT_FCALL                                               'array_push'
         13        SEND_REF                                                 !1
         14        INIT_FCALL                                               'array_merge'
         15        INIT_ARRAY                                       ~10     !2
         16        SEND_VAL                                                 ~10
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $11     
         19        SEND_VAR                                                 $11
         20        DO_ICALL                                                 
   15    21      > JMP                                                      ->11
         22    >   FE_FREE                                                  $9
   14    23      > JMP                                                      ->9
         24    >   FE_FREE                                                  $8
   20    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.33 ms | 1396 KiB | 21 Q