3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inizio = new DateTime('2022-03-21 23:00.000001 Europe/Rome'); $fine = new DateTime('2022-03-22 05:05.000002 Europe/Rome'); $differenza = date_diff($fine,$inizio); $output = $differenza->i; var_dump($output); $string = $output . ''; if(strlen($output . '') == 1) $string = '0' . $output; var_dump($string, 'Stampa su schermo il mio oggetto DateInterval contenuto in $differenza: ', $differenza, $differenza->format('%R%a days')); //Formato con riempimento 0 var_dump($differenza->format('%I'));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/sh3pU
function name:  (null)
number of ops:  42
compiled vars:  !0 = $inizio, !1 = $fine, !2 = $differenza, !3 = $output, !4 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'DateTime'
          1        SEND_VAL_EX                                              '2022-03-21+23%3A00.000001+Europe%2FRome'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
    4     4        NEW                                              $8      'DateTime'
          5        SEND_VAL_EX                                              '2022-03-22+05%3A05.000002+Europe%2FRome'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
    5     8        INIT_FCALL                                               'date_diff'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $11     
         12        ASSIGN                                                   !2, $11
    6    13        FETCH_OBJ_R                                      ~13     !2, 'i'
         14        ASSIGN                                                   !3, ~13
    7    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
    8    18        CONCAT                                           ~16     !3, ''
         19        ASSIGN                                                   !4, ~16
    9    20        CONCAT                                           ~18     !3, ''
         21        STRLEN                                           ~19     ~18
         22        IS_EQUAL                                                 ~19, 1
         23      > JMPZ                                                     ~20, ->26
   10    24    >   CONCAT                                           ~21     '0', !3
         25        ASSIGN                                                   !4, ~21
   11    26    >   INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !4
         28        SEND_VAL                                                 'Stampa+su+schermo+il+mio+oggetto+DateInterval+contenuto+in+%24differenza%3A+'
         29        SEND_VAR                                                 !2
         30        INIT_METHOD_CALL                                         !2, 'format'
         31        SEND_VAL_EX                                              '%25R%25a+days'
         32        DO_FCALL                                      0  $23     
         33        SEND_VAR                                                 $23
         34        DO_ICALL                                                 
   14    35        INIT_FCALL                                               'var_dump'
         36        INIT_METHOD_CALL                                         !2, 'format'
         37        SEND_VAL_EX                                              '%25I'
         38        DO_FCALL                                      0  $25     
         39        SEND_VAR                                                 $25
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.41 ms | 1442 KiB | 15 Q