3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( date_diff(date_create_from_format('Y-m-d H:i:s', '2015-11-10 12:30:00'), date_create('now'))->format('d') ); var_dump(date_create()); var_dump(date_create_from_format('Y-m-d H:i:s', '2015-11-10 12:30:00')); var_dump(date_diff(date_create_from_format('Y-m-d H:i:s', '2015-11-10 12:30:00'), date_create('now'))->format('d'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J2KXo
function name:  (null)
number of ops:  47
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
    4     1        INIT_FCALL                                               'date_diff'
          2        INIT_FCALL                                               'date_create_from_format'
          3        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          4        SEND_VAL                                                 '2015-11-10+12%3A30%3A00'
          5        DO_ICALL                                         $0      
          6        SEND_VAR                                                 $0
          7        INIT_FCALL                                               'date_create'
          8        SEND_VAL                                                 'now'
          9        DO_ICALL                                         $1      
         10        SEND_VAR                                                 $1
         11        DO_ICALL                                         $2      
         12        INIT_METHOD_CALL                                         $2, 'format'
         13        SEND_VAL_EX                                              'd'
         14        DO_FCALL                                      0  $3      
         15        SEND_VAR                                                 $3
         16        DO_ICALL                                                 
    6    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'date_create'
         19        DO_ICALL                                         $5      
         20        SEND_VAR                                                 $5
         21        DO_ICALL                                                 
    7    22        INIT_FCALL                                               'var_dump'
         23        INIT_FCALL                                               'date_create_from_format'
         24        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         25        SEND_VAL                                                 '2015-11-10+12%3A30%3A00'
         26        DO_ICALL                                         $7      
         27        SEND_VAR                                                 $7
         28        DO_ICALL                                                 
    8    29        INIT_FCALL                                               'var_dump'
         30        INIT_FCALL                                               'date_diff'
         31        INIT_FCALL                                               'date_create_from_format'
         32        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         33        SEND_VAL                                                 '2015-11-10+12%3A30%3A00'
         34        DO_ICALL                                         $9      
         35        SEND_VAR                                                 $9
         36        INIT_FCALL                                               'date_create'
         37        SEND_VAL                                                 'now'
         38        DO_ICALL                                         $10     
         39        SEND_VAR                                                 $10
         40        DO_ICALL                                         $11     
         41        INIT_METHOD_CALL                                         $11, 'format'
         42        SEND_VAL_EX                                              'd'
         43        DO_FCALL                                      0  $12     
         44        SEND_VAR                                                 $12
         45        DO_ICALL                                                 
         46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.46 ms | 1392 KiB | 21 Q