3v4l.org

run code in 300+ PHP versions simultaneously
<?php $getAlldate = [ "2018-08-17", "2018-08-20", "2018-08-21", "2018-08-22", "2018-08-23", "2018-08-24", "2018-08-27", "2018-08-28" ]; $getHoliday=[ "2019-1-1", "2019-3-6", "2019-2-28", "2019-5-2", "2019-4-25", "2018-8-27", "2018-8-28" ]; $formattedHoliday = array_map(function ($holiday) { $alldateFormat = 'Y-m-d'; $HolidayFormat = 'Y-n-d'; $date = DateTime::createFromFormat($HolidayFormat, $holiday); return $date->format($alldateFormat); }, $getHoliday); var_dump(array_diff($getAlldate, $formattedHoliday));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rCLCk
function name:  (null)
number of ops:  16
compiled vars:  !0 = $getAlldate, !1 = $getHoliday, !2 = $formattedHoliday
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, <array>
   25     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
   30     4        SEND_VAL                                                 ~5
          5        SEND_VAR                                                 !1
   25     6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
   32     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'array_diff'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $8      
         13        SEND_VAR                                                 $8
         14        DO_ICALL                                                 
         15      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rCLCk
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $holiday, !1 = $alldateFormat, !2 = $HolidayFormat, !3 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV                                             !0      
   26     1        ASSIGN                                                   !1, 'Y-m-d'
   27     2        ASSIGN                                                   !2, 'Y-n-d'
   28     3        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          4        SEND_VAR                                                 !2
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $6      
          7        ASSIGN                                                   !3, $6
   29     8        INIT_METHOD_CALL                                         !3, 'format'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $8      
         11      > RETURN                                                   $8
   30    12*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.34 ms | 1003 KiB | 16 Q