3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set("Europe/Dublin"); echo "TZ: " . date_default_timezone_get() . PHP_EOL; $date = new DateTime("2015-11-26"); $baseDate = new DateTime("1970-01-01"); var_dump($date->diff($baseDate));
based on cooGO
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Xf28d
function name:  (null)
number of ops:  23
compiled vars:  !0 = $date, !1 = $baseDate
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   INIT_FCALL                                               'date_default_timezone_set'
         1        SEND_VAL                                                 'Europe%2FDublin'
         2        DO_ICALL                                                 
   3     3        INIT_FCALL                                               'date_default_timezone_get'
         4        DO_ICALL                                         $3      
         5        CONCAT                                           ~4      'TZ%3A+', $3
         6        CONCAT                                           ~5      ~4, '%0A'
         7        ECHO                                                     ~5
   4     8        NEW                                              $6      :-1
         9        SEND_VAL_EX                                              '2015-11-26'
        10        DO_FCALL                                      0          
        11        ASSIGN                                                   !0, $6
   5    12        NEW                                              $9      :2
        13        SEND_VAL_EX                                              '1970-01-01'
        14        DO_FCALL                                      0          
        15        ASSIGN                                                   !1, $9
   6    16        INIT_FCALL                                               'var_dump'
        17        INIT_METHOD_CALL                                         !0, 'diff'
        18        SEND_VAR_EX                                              !1
        19        DO_FCALL                                      0  $12     
        20        SEND_VAR                                                 $12
        21        DO_ICALL                                                 
        22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.1.0