3v4l.org

run code in 300+ PHP versions simultaneously
<?php $end = strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00')) - 1; $now = time(); $numSecondsUntilEnd = $end - $now; echo $numSecondsUntilEnd; // if required in seconds echo $numSecondsUntilEnd / 60; // if required in minutes echo $numSecondsUntilEnd / 3600; // if required in hours
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GOX7q
function name:  (null)
number of ops:  29
compiled vars:  !0 = $end, !1 = $now, !2 = $numSecondsUntilEnd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '%2B1+month'
          2        INIT_FCALL                                               'strtotime'
          3        INIT_FCALL                                               'date'
          4        SEND_VAL                                                 'm'
          5        DO_ICALL                                         $3      
          6        CONCAT                                           ~4      $3, '%2F01%2F'
          7        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'Y'
          9        DO_ICALL                                         $5      
         10        CONCAT                                           ~6      ~4, $5
         11        CONCAT                                           ~7      ~6, '+00%3A00%3A00'
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                         $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                         $9      
         16        SUB                                              ~10     $9, 1
         17        ASSIGN                                                   !0, ~10
    4    18        INIT_FCALL                                               'time'
         19        DO_ICALL                                         $12     
         20        ASSIGN                                                   !1, $12
    5    21        SUB                                              ~14     !0, !1
         22        ASSIGN                                                   !2, ~14
    6    23        ECHO                                                     !2
    7    24        DIV                                              ~16     !2, 60
         25        ECHO                                                     ~16
    8    26        DIV                                              ~17     !2, 3600
         27        ECHO                                                     ~17
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.3 ms | 1387 KiB | 19 Q