3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); $date='1555133436'; $next_date = new DateTime("@$date"); // find out when they can next access the data $next_date->modify('+1 day'); $now = new DateTime(); // now find out how long they must wait $wait = $next_date->diff($now); echo $wait->format("You must wait %h hours and %i minutes to access the data again\n");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cf9ma
function name:  (null)
number of ops:  25
compiled vars:  !0 = $date, !1 = $next_date, !2 = $now, !3 = $wait
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'UTC'
          2        DO_ICALL                                                 
    4     3        ASSIGN                                                   !0, '1555133436'
    6     4        NEW                                              $6      'DateTime'
          5        NOP                                                      
          6        FAST_CONCAT                                      ~7      '%40', !0
          7        SEND_VAL_EX                                              ~7
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $6
    8    10        INIT_METHOD_CALL                                         !1, 'modify'
         11        SEND_VAL_EX                                              '%2B1+day'
         12        DO_FCALL                                      0          
    9    13        NEW                                              $11     'DateTime'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !2, $11
   11    16        INIT_METHOD_CALL                                         !1, 'diff'
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0  $14     
         19        ASSIGN                                                   !3, $14
   12    20        INIT_METHOD_CALL                                         !3, 'format'
         21        SEND_VAL_EX                                              'You+must+wait+%25h+hours+and+%25i+minutes+to+access+the+data+again%0A'
         22        DO_FCALL                                      0  $16     
         23        ECHO                                                     $16
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.84 ms | 1005 KiB | 14 Q