3v4l.org

run code in 300+ 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 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RJg9B
function name:  (null)
number of ops:  16
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        INIT_FCALL                                               'in_array'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10      > JMPZ                                                     $6, ->13
         11    >   QM_ASSIGN                                        ~7      'Today+is+a+working+day%21'
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~7      'Today+is+a+weekend+day%21'
         14    >   ECHO                                                     ~7
         15      > RETURN                                                   1

Class DaysOfWeek: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.02 ms | 1002 KiB | 15 Q