3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f1 = date("d-m-Y"); $f2 = date("Ymd", strtotime("-7 days")); echo " $f2\n-$f1\n--------\n".($f1-$f2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hs2l5
function name:  (null)
number of ops:  21
compiled vars:  !0 = $f1, !1 = $f2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'd-m-Y'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    3     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'Ymd'
          6        INIT_FCALL                                               'strtotime'
          7        SEND_VAL                                                 '-7+days'
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                         $5      
         11        ASSIGN                                                   !1, $5
    4    12        ROPE_INIT                                     5  ~8      '+'
         13        ROPE_ADD                                      1  ~8      ~8, !1
         14        ROPE_ADD                                      2  ~8      ~8, '%0A-'
         15        ROPE_ADD                                      3  ~8      ~8, !0
         16        ROPE_END                                      4  ~7      ~8, '%0A--------%0A'
         17        SUB                                              ~11     !0, !1
         18        CONCAT                                           ~12     ~7, ~11
         19        ECHO                                                     ~12
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.83 ms | 1395 KiB | 17 Q