3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = "2014-09-29"; $today = date('Y-m-d'); $diff = abs(strtotime($date) - strtotime($today)); $days = floor($diff /3600/24); echo $days;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VjMSo
function name:  (null)
number of ops:  24
compiled vars:  !0 = $date, !1 = $today, !2 = $diff, !3 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2014-09-29'
    3     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'Y-m-d'
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    5     5        INIT_FCALL                                               'abs'
          6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $7      
          9        INIT_FCALL                                               'strtotime'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $8      
         12        SUB                                              ~9      $7, $8
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                         $10     
         15        ASSIGN                                                   !2, $10
    7    16        INIT_FCALL                                               'floor'
         17        DIV                                              ~12     !2, 3600
         18        DIV                                              ~13     ~12, 24
         19        SEND_VAL                                                 ~13
         20        DO_ICALL                                         $14     
         21        ASSIGN                                                   !3, $14
    9    22        ECHO                                                     !3
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.06 ms | 1395 KiB | 21 Q