3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $times = array( '2:00pm', '7:30pm', '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); sort($results); print_r($results);
based on Lv7D1
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
Jump found. Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
Jump found. Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
Jump found. Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
Jump found. Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 16
Jump found. Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
Branch analysis from position: 18
Jump found. Position 1 = -2
Branch analysis from position: 18
filename:       /in/W5g82
function name:  (null)
number of ops:  26
compiled vars:  !0 = $times, !1 = $results, !2 = $time_range, !3 = $combination
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   ASSIGN                                                   !0, <array>
  12     1        ASSIGN                                                   !1, <array>
  14     2      > FE_RESET_R                                       $6      !0, ->18
         3    > > FE_FETCH_R                                               $6, !2, ->18
  15     4    > > FE_RESET_R                                       $7      !1, ->16
         5    > > FE_FETCH_R                                               $7, !3, ->16
  16     6    >   INIT_FCALL                                               'array_push'
         7        SEND_REF                                                 !1
         8        INIT_FCALL                                               'array_merge'
         9        INIT_ARRAY                                       ~8      !2
        10        SEND_VAL                                                 ~8
        11        SEND_VAR                                                 !3
        12        DO_ICALL                                         $9      
        13        SEND_VAR                                                 $9
        14        DO_ICALL                                                 
        15      > JMP                                                      ->5
        16    >   FE_FREE                                                  $7
        17      > JMP                                                      ->3
        18    >   FE_FREE                                                  $6
  20    19        INIT_FCALL                                               'sort'
        20        SEND_REF                                                 !1
        21        DO_ICALL                                                 
  21    22        INIT_FCALL                                               'print_r'
        23        SEND_VAR                                                 !1
        24        DO_ICALL                                                 
        25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0