3v4l.org

run code in 300+ PHP versions simultaneously
<?php //just for testing purposes $sunday11am = strtotime("2016-02-07 11:00:00"); //sunday 11am $sunday11pm = strtotime("2016-02-07 23:00:00"); //sunday 11pm //test with sunday morning $next = (date('N', $sunday11am) == '7' && date('h', $sunday11am) < 22 ? 'this' : 'next'); echo "Sunday Morning: ". date('F jS', strtotime("$next Sunday", $sunday11am)) ."\n"; $next = (date('N', $sunday11pm) == '7' && date('h', $sunday11pm) < 22 ? 'this' : 'next'); echo "Sunday Evening: ". date('F jS', strtotime("$next Sunday")) ."\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 46) Position 1 = 44, Position 2 = 50
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 53
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
Branch analysis from position: 23
2 jumps found. (Code = 46) Position 1 = 44, Position 2 = 50
Branch analysis from position: 44
Branch analysis from position: 50
Branch analysis from position: 20
filename:       /in/HbkHK
function name:  (null)
number of ops:  68
compiled vars:  !0 = $sunday11am, !1 = $sunday11pm, !2 = $next
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '2016-02-07+11%3A00%3A00'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    4     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '2016-02-07+23%3A00%3A00'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    7     8        INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'N'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        IS_EQUAL                                         ~8      $7, '7'
         13      > JMPZ_EX                                          ~8      ~8, ->20
         14    >   INIT_FCALL                                               'date'
         15        SEND_VAL                                                 'h'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $9      
         18        IS_SMALLER                                       ~10     $9, 22
         19        BOOL                                             ~8      ~10
         20    > > JMPZ                                                     ~8, ->23
         21    >   QM_ASSIGN                                        ~11     'this'
         22      > JMP                                                      ->24
         23    >   QM_ASSIGN                                        ~11     'next'
         24    >   ASSIGN                                                   !2, ~11
    8    25        INIT_FCALL                                               'date'
         26        SEND_VAL                                                 'F+jS'
         27        INIT_FCALL                                               'strtotime'
         28        NOP                                                      
         29        FAST_CONCAT                                      ~13     !2, '+Sunday'
         30        SEND_VAL                                                 ~13
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                         $14     
         33        SEND_VAR                                                 $14
         34        DO_ICALL                                         $15     
         35        CONCAT                                           ~16     'Sunday+Morning%3A+', $15
         36        CONCAT                                           ~17     ~16, '%0A'
         37        ECHO                                                     ~17
   10    38        INIT_FCALL                                               'date'
         39        SEND_VAL                                                 'N'
         40        SEND_VAR                                                 !1
         41        DO_ICALL                                         $18     
         42        IS_EQUAL                                         ~19     $18, '7'
         43      > JMPZ_EX                                          ~19     ~19, ->50
         44    >   INIT_FCALL                                               'date'
         45        SEND_VAL                                                 'h'
         46        SEND_VAR                                                 !1
         47        DO_ICALL                                         $20     
         48        IS_SMALLER                                       ~21     $20, 22
         49        BOOL                                             ~19     ~21
         50    > > JMPZ                                                     ~19, ->53
         51    >   QM_ASSIGN                                        ~22     'this'
         52      > JMP                                                      ->54
         53    >   QM_ASSIGN                                        ~22     'next'
         54    >   ASSIGN                                                   !2, ~22
   11    55        INIT_FCALL                                               'date'
         56        SEND_VAL                                                 'F+jS'
         57        INIT_FCALL                                               'strtotime'
         58        NOP                                                      
         59        FAST_CONCAT                                      ~24     !2, '+Sunday'
         60        SEND_VAL                                                 ~24
         61        DO_ICALL                                         $25     
         62        SEND_VAR                                                 $25
         63        DO_ICALL                                         $26     
         64        CONCAT                                           ~27     'Sunday+Evening%3A+', $26
         65        CONCAT                                           ~28     ~27, '%0A'
         66        ECHO                                                     ~28
         67      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.23 ms | 1019 KiB | 15 Q