3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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: ", ($now2-$then2) / 60 / 60, " hours\n"; echo "Simple: ", 20*365*24, " hours\n";
based on PF9bE
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/5gXB8
function name:  (null)
number of ops:  42
compiled vars:  !0 = $now, !1 = $then, !2 = $now2, !3 = $then2
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                                         $4      
         4        ASSIGN                                           $5      !0, $4
         5        ECHO                                                     $5
         6        ECHO                                                     '%0A'
   4     7        ECHO                                                     'Then%3A+'
         8        INIT_FCALL                                               'strtotime'
         9        SEND_VAL                                                 'now+-20+years'
        10        DO_ICALL                                         $6      
        11        ASSIGN                                           $7      !1, $6
        12        ECHO                                                     $7
        13        ECHO                                                     '%0A'
   5    14        INIT_FCALL                                               'strtotime'
        15        SEND_VAL                                                 'now+%2B1+year'
        16        DO_ICALL                                         $8      
        17        ASSIGN                                           $9      !2, $8
        18        ECHO                                                     $9
        19        ECHO                                                     '%0A'
   6    20        INIT_FCALL                                               'strtotime'
        21        SEND_VAL                                                 'now+-19+years'
        22        DO_ICALL                                         $10     
        23        ASSIGN                                           $11     !3, $10
        24        ECHO                                                     $11
        25        ECHO                                                     '%0A'
   8    26        ECHO                                                     'Dif+1%3A+'
        27        SUB                                              ~12     !0, !1
        28        DIV                                              ~13     ~12, 60
        29        DIV                                              ~14     ~13, 60
        30        ECHO                                                     ~14
        31        ECHO                                                     '+hours%0A'
   9    32        ECHO                                                     'Dif+2%3A+'
        33        SUB                                              ~15     !2, !3
        34        DIV                                              ~16     ~15, 60
        35        DIV                                              ~17     ~16, 60
        36        ECHO                                                     ~17
        37        ECHO                                                     '+hours%0A'
  10    38        ECHO                                                     'Simple%3A+'
        39        ECHO                                                     175200
        40        ECHO                                                     '+hours%0A'
        41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0