3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = '2016-10-19'; if ($start != '0000-00-00' and strtotime($start) > strtotime('now')) { $start = strtotime($start); } echo date('Y-m-d', $start);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 11
filename:       /in/u5ZtM
function name:  (null)
number of ops:  22
compiled vars:  !0 = $start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2016-10-19'
    5     1        IS_NOT_EQUAL                                     ~2      !0, '0000-00-00'
          2      > JMPZ_EX                                          ~2      ~2, ->11
          3    >   INIT_FCALL                                               'strtotime'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        INIT_FCALL                                               'strtotime'
          7        SEND_VAL                                                 'now'
          8        DO_ICALL                                         $4      
          9        IS_SMALLER                                       ~5      $4, $3
         10        BOOL                                             ~2      ~5
         11    > > JMPZ                                                     ~2, ->16
    6    12    >   INIT_FCALL                                               'strtotime'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !0, $6
    9    16    >   INIT_FCALL                                               'date'
         17        SEND_VAL                                                 'Y-m-d'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $8      
         20        ECHO                                                     $8
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.09 ms | 1395 KiB | 17 Q