3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "1:00 pm"; $timestamp = (strtotime($string) > time()) ? strtotime($string) : strtotime("tomorrow " . $string); echo date("r",$timestamp);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8fpvi
function name:  (null)
number of ops:  25
compiled vars:  !0 = $string, !1 = $timestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '1%3A00+pm'
    3     1        INIT_FCALL                                               'strtotime'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        INIT_FCALL                                               'time'
          5        DO_ICALL                                         $4      
          6        IS_SMALLER                                               $4, $3
          7      > JMPZ                                                     ~5, ->13
          8    >   INIT_FCALL                                               'strtotime'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $6      
         11        QM_ASSIGN                                        ~7      $6
         12      > JMP                                                      ->18
         13    >   INIT_FCALL                                               'strtotime'
         14        CONCAT                                           ~8      'tomorrow+', !0
         15        SEND_VAL                                                 ~8
         16        DO_ICALL                                         $9      
         17        QM_ASSIGN                                        ~7      $9
         18    >   ASSIGN                                                   !1, ~7
    4    19        INIT_FCALL                                               'date'
         20        SEND_VAL                                                 'r'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $11     
         23        ECHO                                                     $11
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.06 ms | 1395 KiB | 19 Q