3v4l.org

run code in 500+ PHP versions simultaneously
<?php abstract class DaysOfWeek { const Sunday = 0; const Monday = 1; const Tuesday = 2; const Wednesday = 3; const Thursday = 4; const Friday = 5; const Saturday = 6; } $working_days = [DaysOfWeek::Monday, DaysOfWeek::Tuesday, DaysOfWeek::Wednesday, DaysOfWeek::Thursday, DaysOfWeek::Friday]; $today = (int)date('w'); echo in_array($today, $working_days) ? 'Today is a working day!' : 'Today is a weekend day!';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RJg9B
function name:  (null)
number of ops:  13
compiled vars:  !0 = $working_days, !1 = $today
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                       !0, <array>
   15     1        INIT_FCALL                                                   'date'
          2        SEND_VAL                                                     'w'
          3        DO_ICALL                                             $3      
          4        CAST                                              4  ~4      $3
          5        ASSIGN                                                       !1, ~4
   17     6        FRAMELESS_ICALL_2                in_array            ~6      !1, !0
          7      > JMPZ                                                         ~6, ->10
          8    >   QM_ASSIGN                                            ~7      'Today+is+a+working+day%21'
          9      > JMP                                                          ->11
         10    >   QM_ASSIGN                                            ~7      'Today+is+a+weekend+day%21'
         11    >   ECHO                                                         ~7
         12      > RETURN                                                       1

Class DaysOfWeek: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.6 ms | 2104 KiB | 14 Q