3v4l.org

run code in 300+ PHP versions simultaneously
<?php $before = new DateTime('2013-06-13'); $days = $before->diff(new DateTime())->format('%a'); var_dump($days . ' day' . (($days > 1 || $days < 0) ? 's' : ''));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/p8b4U
function name:  (null)
number of ops:  27
compiled vars:  !0 = $before, !1 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'DateTime'
          1        SEND_VAL_EX                                              '2013-06-13'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    3     4        INIT_METHOD_CALL                                         !0, 'diff'
          5        NEW                                              $5      'DateTime'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $5
          8        DO_FCALL                                      0  $7      
          9        INIT_METHOD_CALL                                         $7, 'format'
         10        SEND_VAL_EX                                              '%25a'
         11        DO_FCALL                                      0  $8      
         12        ASSIGN                                                   !1, $8
    4    13        INIT_FCALL                                               'var_dump'
         14        CONCAT                                           ~10     !1, '+day'
         15        IS_SMALLER                                       ~11     1, !1
         16      > JMPNZ_EX                                         ~11     ~11, ->19
         17    >   IS_SMALLER                                       ~12     !1, 0
         18        BOOL                                             ~11     ~12
         19    > > JMPZ                                                     ~11, ->22
         20    >   QM_ASSIGN                                        ~13     's'
         21      > JMP                                                      ->23
         22    >   QM_ASSIGN                                        ~13     ''
         23    >   CONCAT                                           ~14     ~10, ~13
         24        SEND_VAL                                                 ~14
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.81 ms | 1395 KiB | 15 Q