3v4l.org

run code in 300+ PHP versions simultaneously
<?php $delivery = array( 'next' => 1, 'max' => 2, 'exclude' => array(6 => "Samstag", 7 => "Sonntag"), 'afterhour' => 14, 'message' => "Lieferung bis %tomorrow% (%tomorrow_date_full%) oder %dayaftertomorrow% (%dayaftertomorrow_date_full%)", 'translate' => array('tomorrow' => 'morgen', 'dayaftertomorrow' => 'übermorgen'), 'date' => date("d.m.Y")); function checkWeekend($delivery) { $wochentage = array( 1=>"Montag", 2=>"Dienstag", 3=>"Mittwoch", 4=>"Donnerstag", 5=>"Freitag", 6=>"Samstag", 7=>"Sonntag"); $liefertage = array_diff($wochentage, $delivery['exclude']); $date = $delivery['date']; $currentDay = (int) date('N'); var_dump($currentDay); print_r($liefertage); } checkWeekend($delivery); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6hg2C
function name:  (null)
number of ops:  15
compiled vars:  !0 = $delivery
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_ARRAY                                       ~1      1, 'next'
    4     1        ADD_ARRAY_ELEMENT                                ~1      2, 'max'
    3     2        ADD_ARRAY_ELEMENT                                ~1      <array>, 'exclude'
    6     3        ADD_ARRAY_ELEMENT                                ~1      14, 'afterhour'
    7     4        ADD_ARRAY_ELEMENT                                ~1      'Lieferung+bis+%25tomorrow%25+%28%25tomorrow_date_full%25%29+oder+%25dayaftertomorrow%25+%28%25dayaftertomorrow_date_full%25%29', 'message'
    3     5        ADD_ARRAY_ELEMENT                                ~1      <array>, 'translate'
    9     6        INIT_FCALL                                               'date'
          7        SEND_VAL                                                 'd.m.Y'
          8        DO_ICALL                                         $2      
          9        ADD_ARRAY_ELEMENT                                ~1      $2, 'date'
    2    10        ASSIGN                                                   !0, ~1
   31    11        INIT_FCALL                                               'checkweekend'
         12        SEND_VAR                                                 !0
         13        DO_FCALL                                      0          
   32    14      > RETURN                                                   1

Function checkweekend:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6hg2C
function name:  checkWeekend
number of ops:  22
compiled vars:  !0 = $delivery, !1 = $wochentage, !2 = $liefertage, !3 = $date, !4 = $currentDay
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        ASSIGN                                                   !1, <array>
   22     2        INIT_FCALL                                               'array_diff'
          3        SEND_VAR                                                 !1
          4        FETCH_DIM_R                                      ~6      !0, 'exclude'
          5        SEND_VAL                                                 ~6
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !2, $7
   23     8        FETCH_DIM_R                                      ~9      !0, 'date'
          9        ASSIGN                                                   !3, ~9
   24    10        INIT_FCALL                                               'date'
         11        SEND_VAL                                                 'N'
         12        DO_ICALL                                         $11     
         13        CAST                                          4  ~12     $11
         14        ASSIGN                                                   !4, ~12
   26    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !4
         17        DO_ICALL                                                 
   28    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
   29    21      > RETURN                                                   null

End of function checkweekend

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.73 ms | 1403 KiB | 22 Q