3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'last midnight'; date_default_timezone_set('UTC'); var_dump(strtotime($str)); var_dump('22 ' . date('r', strtotime($str, time()))); var_dump('22 ' . date('r', strtotime($str, strtotime('2013-05-23 00:30')))); var_dump('22 ' . date('r', strtotime($str, strtotime('2013-05-22 23:30')))); var_dump('?? ' . date('r', strtotime($str, strtotime('2013-05-22 22:30')))); var_dump('21 ' . date('r', strtotime($str, strtotime('2013-05-22 21:00'))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pq1pe
function name:  (null)
number of ops:  85
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'last+midnight'
    3     1        INIT_FCALL                                               'date_default_timezone_set'
          2        SEND_VAL                                                 'UTC'
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'strtotime'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
    6    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'date'
         12        SEND_VAL                                                 'r'
         13        INIT_FCALL                                               'strtotime'
         14        SEND_VAR                                                 !0
         15        INIT_FCALL                                               'time'
         16        DO_ICALL                                         $5      
         17        SEND_VAR                                                 $5
         18        DO_ICALL                                         $6      
         19        SEND_VAR                                                 $6
         20        DO_ICALL                                         $7      
         21        CONCAT                                           ~8      '22+', $7
         22        SEND_VAL                                                 ~8
         23        DO_ICALL                                                 
    7    24        INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'date'
         26        SEND_VAL                                                 'r'
         27        INIT_FCALL                                               'strtotime'
         28        SEND_VAR                                                 !0
         29        INIT_FCALL                                               'strtotime'
         30        SEND_VAL                                                 '2013-05-23+00%3A30'
         31        DO_ICALL                                         $10     
         32        SEND_VAR                                                 $10
         33        DO_ICALL                                         $11     
         34        SEND_VAR                                                 $11
         35        DO_ICALL                                         $12     
         36        CONCAT                                           ~13     '22+', $12
         37        SEND_VAL                                                 ~13
         38        DO_ICALL                                                 
    8    39        INIT_FCALL                                               'var_dump'
         40        INIT_FCALL                                               'date'
         41        SEND_VAL                                                 'r'
         42        INIT_FCALL                                               'strtotime'
         43        SEND_VAR                                                 !0
         44        INIT_FCALL                                               'strtotime'
         45        SEND_VAL                                                 '2013-05-22+23%3A30'
         46        DO_ICALL                                         $15     
         47        SEND_VAR                                                 $15
         48        DO_ICALL                                         $16     
         49        SEND_VAR                                                 $16
         50        DO_ICALL                                         $17     
         51        CONCAT                                           ~18     '22+', $17
         52        SEND_VAL                                                 ~18
         53        DO_ICALL                                                 
    9    54        INIT_FCALL                                               'var_dump'
         55        INIT_FCALL                                               'date'
         56        SEND_VAL                                                 'r'
         57        INIT_FCALL                                               'strtotime'
         58        SEND_VAR                                                 !0
         59        INIT_FCALL                                               'strtotime'
         60        SEND_VAL                                                 '2013-05-22+22%3A30'
         61        DO_ICALL                                         $20     
         62        SEND_VAR                                                 $20
         63        DO_ICALL                                         $21     
         64        SEND_VAR                                                 $21
         65        DO_ICALL                                         $22     
         66        CONCAT                                           ~23     '%3F%3F+', $22
         67        SEND_VAL                                                 ~23
         68        DO_ICALL                                                 
   10    69        INIT_FCALL                                               'var_dump'
         70        INIT_FCALL                                               'date'
         71        SEND_VAL                                                 'r'
         72        INIT_FCALL                                               'strtotime'
         73        SEND_VAR                                                 !0
         74        INIT_FCALL                                               'strtotime'
         75        SEND_VAL                                                 '2013-05-22+21%3A00'
         76        DO_ICALL                                         $25     
         77        SEND_VAR                                                 $25
         78        DO_ICALL                                         $26     
         79        SEND_VAR                                                 $26
         80        DO_ICALL                                         $27     
         81        CONCAT                                           ~28     '21+', $27
         82        SEND_VAL                                                 ~28
         83        DO_ICALL                                                 
         84      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.31 ms | 1400 KiB | 23 Q