3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_seance = "2014-01-31 11:00"; $date_cours = "2013-10-28 17:15:00"; $date_finish = date_create_from_format("Y-m-d H:i:s",$date_cours); $date_assign = date_create($date_seance); if ($date_finish AND $date_assign) { $interval = date_diff($date_finish,$date_assign); if (isset($interval)) { $result = $interval->format('%d'); } } else { $result = 0; } print $result;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 26
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/svZZf
function name:  (null)
number of ops:  29
compiled vars:  !0 = $date_seance, !1 = $date_cours, !2 = $date_finish, !3 = $date_assign, !4 = $interval, !5 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2014-01-31+11%3A00'
    3     1        ASSIGN                                                   !1, '2013-10-28+17%3A15%3A00'
    4     2        INIT_FCALL                                               'date_create_from_format'
          3        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !2, $8
    5     7        INIT_FCALL                                               'date_create'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $10     
         10        ASSIGN                                                   !3, $10
    7    11      > JMPZ_EX                                          ~12     !2, ->13
         12    >   BOOL                                             ~12     !3
         13    > > JMPZ                                                     ~12, ->26
    8    14    >   INIT_FCALL                                               'date_diff'
         15        SEND_VAR                                                 !2
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $13     
         18        ASSIGN                                                   !4, $13
    9    19        ISSET_ISEMPTY_CV                                         !4
         20      > JMPZ                                                     ~15, ->25
   10    21    >   INIT_METHOD_CALL                                         !4, 'format'
         22        SEND_VAL_EX                                              '%25d'
         23        DO_FCALL                                      0  $16     
         24        ASSIGN                                                   !5, $16
         25    > > JMP                                                      ->27
   13    26    >   ASSIGN                                                   !5, 0
   15    27    >   ECHO                                                     !5
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.71 ms | 1396 KiB | 19 Q