3v4l.org

run code in 300+ PHP versions simultaneously
<?php $before = new DateTime('2013-06-13'); $days = $before->diff(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/2igi0
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        INIT_FCALL_BY_NAME                                       'DateTime'
          6        DO_FCALL                                      0  $5      
          7        SEND_VAR_NO_REF_EX                                       $5
          8        DO_FCALL                                      0  $6      
          9        INIT_METHOD_CALL                                         $6, 'format'
         10        SEND_VAL_EX                                              '%25a'
         11        DO_FCALL                                      0  $7      
         12        ASSIGN                                                   !1, $7
    4    13        INIT_FCALL                                               'var_dump'
         14        CONCAT                                           ~9      !1, '+day'
         15        IS_SMALLER                                       ~10     1, !1
         16      > JMPNZ_EX                                         ~10     ~10, ->19
         17    >   IS_SMALLER                                       ~11     !1, 0
         18        BOOL                                             ~10     ~11
         19    > > JMPZ                                                     ~10, ->22
         20    >   QM_ASSIGN                                        ~12     's'
         21      > JMP                                                      ->23
         22    >   QM_ASSIGN                                        ~12     ''
         23    >   CONCAT                                           ~13     ~9, ~12
         24        SEND_VAL                                                 ~13
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.78 ms | 1395 KiB | 15 Q