3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = strtotime('6:00am'); $end = strtotime('09:00am'); $range = array(); while ($start !== $end) { $start = strtotime('+30 minutes',$start); $range[] = date('h:ia', $start); } print_r($range);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 10
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 10
Branch analysis from position: 23
Branch analysis from position: 10
filename:       /in/GS5hm
function name:  (null)
number of ops:  27
compiled vars:  !0 = $start, !1 = $end, !2 = $range
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '6%3A00am'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    4     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '09%3A00am'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    5     8        ASSIGN                                                   !2, <array>
    6     9      > JMP                                                      ->21
    8    10    >   INIT_FCALL                                               'strtotime'
         11        SEND_VAL                                                 '%2B30+minutes'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !0, $8
    9    15        INIT_FCALL                                               'date'
         16        SEND_VAL                                                 'h%3Aia'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $11     
         19        ASSIGN_DIM                                               !2
         20        OP_DATA                                                  $11
    6    21    >   IS_NOT_IDENTICAL                                         !0, !1
         22      > JMPNZ                                                    ~12, ->10
   11    23    >   INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.76 ms | 1395 KiB | 19 Q