3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $time=time(); $date = date("Y-m-d h:i:sa"); echo date_format($date,"Y/m/d H:i:s"); $d=mktime(14, 30, 00, date("d", $time), date("m", $time), date("Y", $time)); echo "<br />"."Created date is " . date("Y-m-d h:i:sa", $d); echo "<br />"."Current date is " . date("Y-m-d h:i:sa", $time); echo date_default_timezone_get(); $str_time = date("Y", $time)."-".date("m", $time)."-".date("d", $time)." 14:30:00"; echo $str_time; //echo "25-08-2011 17:30:30 = ".strtotime ("25-08-2011 17:30:30")." = ".date ("d-m-Y H:i:s", strtotime ("25-08-2011 17:30:30"))."<br>"; //echo "25-08-2011 17:31:17 = ".strtotime ("25-08-2011 17:31:17")." = ".date ("d-m-Y H:i:s", strtotime ("25-08-2011 17:31:17"))."<br>"; echo "====".date("H:i:s", strtotime ($str_time)-strtotime ($str_time))."===="; $localtime = localtime(); $localtime_assoc = localtime(time(), true); print_r($localtime); print_r($localtime_assoc);
based on M2MPb
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7olCX
function name:  (null)
number of ops:  98
compiled vars:  !0 = $time, !1 = $date, !2 = $d, !3 = $str_time, !4 = $localtime, !5 = $localtime_assoc
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   INIT_FCALL                                               'time'
         1        DO_ICALL                                         $6      
         2        ASSIGN                                                   !0, $6
   3     3        INIT_FCALL                                               'date'
         4        SEND_VAL                                                 'Y-m-d+h%3Ai%3Asa'
         5        DO_ICALL                                         $8      
         6        ASSIGN                                                   !1, $8
   4     7        INIT_FCALL                                               'date_format'
         8        SEND_VAR                                                 !1
         9        SEND_VAL                                                 'Y%2Fm%2Fd+H%3Ai%3As'
        10        DO_ICALL                                         $10     
        11        ECHO                                                     $10
   6    12        INIT_FCALL                                               'mktime'
        13        SEND_VAL                                                 14
        14        SEND_VAL                                                 30
        15        SEND_VAL                                                 0
        16        INIT_FCALL                                               'date'
        17        SEND_VAL                                                 'd'
        18        SEND_VAR                                                 !0
        19        DO_ICALL                                         $11     
        20        SEND_VAR                                                 $11
        21        INIT_FCALL                                               'date'
        22        SEND_VAL                                                 'm'
        23        SEND_VAR                                                 !0
        24        DO_ICALL                                         $12     
        25        SEND_VAR                                                 $12
        26        INIT_FCALL                                               'date'
        27        SEND_VAL                                                 'Y'
        28        SEND_VAR                                                 !0
        29        DO_ICALL                                         $13     
        30        SEND_VAR                                                 $13
        31        DO_ICALL                                         $14     
        32        ASSIGN                                                   !2, $14
   8    33        INIT_FCALL                                               'date'
        34        SEND_VAL                                                 'Y-m-d+h%3Ai%3Asa'
        35        SEND_VAR                                                 !2
        36        DO_ICALL                                         $16     
        37        CONCAT                                           ~17     '%3Cbr+%2F%3ECreated+date+is+', $16
        38        ECHO                                                     ~17
   9    39        INIT_FCALL                                               'date'
        40        SEND_VAL                                                 'Y-m-d+h%3Ai%3Asa'
        41        SEND_VAR                                                 !0
        42        DO_ICALL                                         $18     
        43        CONCAT                                           ~19     '%3Cbr+%2F%3ECurrent+date+is+', $18
        44        ECHO                                                     ~19
  10    45        INIT_FCALL                                               'date_default_timezone_get'
        46        DO_ICALL                                         $20     
        47        ECHO                                                     $20
  11    48        INIT_FCALL                                               'date'
        49        SEND_VAL                                                 'Y'
        50        SEND_VAR                                                 !0
        51        DO_ICALL                                         $21     
        52        CONCAT                                           ~22     $21, '-'
        53        INIT_FCALL                                               'date'
        54        SEND_VAL                                                 'm'
        55        SEND_VAR                                                 !0
        56        DO_ICALL                                         $23     
        57        CONCAT                                           ~24     ~22, $23
        58        CONCAT                                           ~25     ~24, '-'
        59        INIT_FCALL                                               'date'
        60        SEND_VAL                                                 'd'
        61        SEND_VAR                                                 !0
        62        DO_ICALL                                         $26     
        63        CONCAT                                           ~27     ~25, $26
        64        CONCAT                                           ~28     ~27, '+14%3A30%3A00'
        65        ASSIGN                                                   !3, ~28
  12    66        ECHO                                                     !3
  15    67        INIT_FCALL                                               'date'
        68        SEND_VAL                                                 'H%3Ai%3As'
        69        INIT_FCALL                                               'strtotime'
        70        SEND_VAR                                                 !3
        71        DO_ICALL                                         $30     
        72        INIT_FCALL                                               'strtotime'
        73        SEND_VAR                                                 !3
        74        DO_ICALL                                         $31     
        75        SUB                                              ~32     $30, $31
        76        SEND_VAL                                                 ~32
        77        DO_ICALL                                         $33     
        78        CONCAT                                           ~34     '%3D%3D%3D%3D', $33
        79        CONCAT                                           ~35     ~34, '%3D%3D%3D%3D'
        80        ECHO                                                     ~35
  17    81        INIT_FCALL                                               'localtime'
        82        DO_ICALL                                         $36     
        83        ASSIGN                                                   !4, $36
  18    84        INIT_FCALL                                               'localtime'
        85        INIT_FCALL                                               'time'
        86        DO_ICALL                                         $38     
        87        SEND_VAR                                                 $38
        88        SEND_VAL                                                 <true>
        89        DO_ICALL                                         $39     
        90        ASSIGN                                                   !5, $39
  19    91        INIT_FCALL                                               'print_r'
        92        SEND_VAR                                                 !4
        93        DO_ICALL                                                 
  20    94        INIT_FCALL                                               'print_r'
        95        SEND_VAR                                                 !5
        96        DO_ICALL                                                 
        97      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0