3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current = date('Y-m-d'); $nextBusinessDay = date('Y-m-d', strtotime($current . '+ 3 Weekday')); $interval = date_diff($current, $nextBusinessDay); $diff = $interval->format('%R%a days'); var_dump($interval, $diff);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dploU
function name:  (null)
number of ops:  27
compiled vars:  !0 = $current, !1 = $nextBusinessDay, !2 = $interval, !3 = $diff
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   INIT_FCALL                                               'date'
         1        SEND_VAL                                                 'Y-m-d'
         2        DO_ICALL                                         $4      
         3        QM_ASSIGN                                                !0
   4     4        INIT_FCALL                                               'date'
         5        SEND_VAL                                                 'Y-m-d'
         6        INIT_FCALL                                               'strtotime'
         7        CONCAT                                           ~6      !0, '%2B+3+Weekday'
         8        SEND_VAL                                                 ~6
         9        DO_ICALL                                         $7      
        10        SEND_VAR                                                 $7
        11        DO_ICALL                                         $8      
        12        QM_ASSIGN                                                !1
   5    13        INIT_FCALL                                               'date_diff'
        14        SEND_VAR                                                 !0
        15        SEND_VAR                                                 !1
        16        DO_ICALL                                         $10     
        17        QM_ASSIGN                                                !2
   6    18        INIT_METHOD_CALL                                         !2, 'format'
        19        SEND_VAL_EX                                              '%25R%25a+days'
        20        DO_FCALL                                      0  $12     
        21        QM_ASSIGN                                                !3
   7    22        INIT_FCALL                                               'var_dump'
        23        SEND_VAR                                                 !2
        24        SEND_VAR                                                 !3
        25        DO_ICALL                                                 
        26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
30.79 ms | 411 KiB | 7 Q