3v4l.org

run code in 300+ PHP versions simultaneously
<?php $end_date = "2014-09-09 17:03:10"; date_default_timezone_set('Asia/Calcutta'); $now = date('Y-m-d H:i:s'); $diff = strtotime($now) - strtotime($end_date); $fullDays = floor($diff/(60*60*24)); $fullHours = floor(($diff-($fullDays*60*60*24))/(60*60)); $fullMinutes = floor(($diff-($fullDays*60*60*24)-($fullHours*60*60))/60); echo "Differernce is $fullDays days, $fullHours hours and $fullMinutes minutes.";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FnGPV
function name:  (null)
number of ops:  51
compiled vars:  !0 = $end_date, !1 = $now, !2 = $diff, !3 = $fullDays, !4 = $fullHours, !5 = $fullMinutes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2014-09-09+17%3A03%3A10'
    3     1        INIT_FCALL                                               'date_default_timezone_set'
          2        SEND_VAL                                                 'Asia%2FCalcutta'
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !1, $8
    6     8        INIT_FCALL                                               'strtotime'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $10     
         11        INIT_FCALL                                               'strtotime'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $11     
         14        SUB                                              ~12     $10, $11
         15        ASSIGN                                                   !2, ~12
    7    16        INIT_FCALL                                               'floor'
         17        DIV                                              ~14     !2, 86400
         18        SEND_VAL                                                 ~14
         19        DO_ICALL                                         $15     
         20        ASSIGN                                                   !3, $15
    8    21        INIT_FCALL                                               'floor'
         22        MUL                                              ~17     !3, 60
         23        MUL                                              ~18     ~17, 60
         24        MUL                                              ~19     ~18, 24
         25        SUB                                              ~20     !2, ~19
         26        DIV                                              ~21     ~20, 3600
         27        SEND_VAL                                                 ~21
         28        DO_ICALL                                         $22     
         29        ASSIGN                                                   !4, $22
    9    30        INIT_FCALL                                               'floor'
         31        MUL                                              ~24     !3, 60
         32        MUL                                              ~25     ~24, 60
         33        MUL                                              ~26     ~25, 24
         34        SUB                                              ~27     !2, ~26
         35        MUL                                              ~28     !4, 60
         36        MUL                                              ~29     ~28, 60
         37        SUB                                              ~30     ~27, ~29
         38        DIV                                              ~31     ~30, 60
         39        SEND_VAL                                                 ~31
         40        DO_ICALL                                         $32     
         41        ASSIGN                                                   !5, $32
   10    42        ROPE_INIT                                     7  ~35     'Differernce+is+'
         43        ROPE_ADD                                      1  ~35     ~35, !3
         44        ROPE_ADD                                      2  ~35     ~35, '+days%2C+'
         45        ROPE_ADD                                      3  ~35     ~35, !4
         46        ROPE_ADD                                      4  ~35     ~35, '+hours+and+'
         47        ROPE_ADD                                      5  ~35     ~35, !5
         48        ROPE_END                                      6  ~34     ~35, '+minutes.'
         49        ECHO                                                     ~34
         50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.02 ms | 1392 KiB | 21 Q