3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Now: ", $now = strtotime("now"), "\n"; echo "Then: ", $then = strtotime("now -20 years"), "\n"; echo $now2 = strtotime("now +1 year"), "\n"; echo $then2 = strtotime("now -19 years"), "\n"; echo "Dif 1: ", ($now-$then) / 60 / 60, " hours\n"; echo "Dif 2: ", $dif2 = ($now2-$then2) / 60 / 60, " hours\n"; echo "Simple: ", $simple = 20*365*24, " hours\n"; echo "Dif to simple ", $dif2 - $simple, "hours\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/19AU8
function name:  (null)
number of ops:  48
compiled vars:  !0 = $now, !1 = $then, !2 = $now2, !3 = $then2, !4 = $dif2, !5 = $simple
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'Now%3A+'
          1        INIT_FCALL                                               'strtotime'
          2        SEND_VAL                                                 'now'
          3        DO_ICALL                                         $6      
          4        ASSIGN                                           ~7      !0, $6
          5        ECHO                                                     ~7
          6        ECHO                                                     '%0A'
    4     7        ECHO                                                     'Then%3A+'
          8        INIT_FCALL                                               'strtotime'
          9        SEND_VAL                                                 'now+-20+years'
         10        DO_ICALL                                         $8      
         11        ASSIGN                                           ~9      !1, $8
         12        ECHO                                                     ~9
         13        ECHO                                                     '%0A'
    5    14        INIT_FCALL                                               'strtotime'
         15        SEND_VAL                                                 'now+%2B1+year'
         16        DO_ICALL                                         $10     
         17        ASSIGN                                           ~11     !2, $10
         18        ECHO                                                     ~11
         19        ECHO                                                     '%0A'
    6    20        INIT_FCALL                                               'strtotime'
         21        SEND_VAL                                                 'now+-19+years'
         22        DO_ICALL                                         $12     
         23        ASSIGN                                           ~13     !3, $12
         24        ECHO                                                     ~13
         25        ECHO                                                     '%0A'
    8    26        ECHO                                                     'Dif+1%3A+'
         27        SUB                                              ~14     !0, !1
         28        DIV                                              ~15     ~14, 60
         29        DIV                                              ~16     ~15, 60
         30        ECHO                                                     ~16
         31        ECHO                                                     '+hours%0A'
    9    32        ECHO                                                     'Dif+2%3A+'
         33        SUB                                              ~17     !2, !3
         34        DIV                                              ~18     ~17, 60
         35        DIV                                              ~19     ~18, 60
         36        ASSIGN                                           ~20     !4, ~19
         37        ECHO                                                     ~20
         38        ECHO                                                     '+hours%0A'
   10    39        ECHO                                                     'Simple%3A+'
         40        ASSIGN                                           ~21     !5, 175200
         41        ECHO                                                     ~21
         42        ECHO                                                     '+hours%0A'
   11    43        ECHO                                                     'Dif+to+simple+'
         44        SUB                                              ~22     !4, !5
         45        ECHO                                                     ~22
         46        ECHO                                                     'hours%0A'
         47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.28 ms | 1392 KiB | 15 Q