3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start_date=new DateTime("2015-12-14T23:59:59"); $end_date=new DateTime("2015-12-19T23:59:59"); $output = array(); if($start_date > $end_date){ $output["status"] = "error"; $output["reason"] = "End Date is before Start Date"; return $output; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kBD1b
function name:  (null)
number of ops:  17
compiled vars:  !0 = $start_date, !1 = $end_date, !2 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '2015-12-14T23%3A59%3A59'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    5     4        NEW                                              $6      'DateTime'
          5        SEND_VAL_EX                                              '2015-12-19T23%3A59%3A59'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    7     8        ASSIGN                                                   !2, <array>
    9     9        IS_SMALLER                                               !1, !0
         10      > JMPZ                                                     ~10, ->16
   10    11    >   ASSIGN_DIM                                               !2, 'status'
         12        OP_DATA                                                  'error'
   11    13        ASSIGN_DIM                                               !2, 'reason'
         14        OP_DATA                                                  'End+Date+is+before+Start+Date'
   12    15      > RETURN                                                   !2
   13    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.74 ms | 1393 KiB | 13 Q