3v4l.org

run code in 300+ PHP versions simultaneously
<?php function add_date($givendate,$hours) { $cd = strtotime($givendate); $newdate = date('Y-m-d h:i:s', mktime(date('h', $cd) + $hours)); return $newdate; } echo(date('Y/m/d H:i:s')."\n");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bCp0m
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Y%2Fm%2Fd+H%3Ai%3As'
          2        DO_ICALL                                         $0      
          3        CONCAT                                           ~1      $0, '%0A'
          4        ECHO                                                     ~1
          5      > RETURN                                                   1

Function add_date:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bCp0m
function name:  add_date
number of ops:  21
compiled vars:  !0 = $givendate, !1 = $hours, !2 = $cd, !3 = $newdate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !2, $4
    4     6        INIT_FCALL                                               'date'
          7        SEND_VAL                                                 'Y-m-d+h%3Ai%3As'
          8        INIT_FCALL                                               'mktime'
          9        INIT_FCALL                                               'date'
         10        SEND_VAL                                                 'h'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $6      
         13        ADD                                              ~7      $6, !1
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                         $8      
         16        SEND_VAR                                                 $8
         17        DO_ICALL                                         $9      
         18        ASSIGN                                                   !3, $9
    5    19      > RETURN                                                   !3
    6    20*     > RETURN                                                   null

End of function add_date

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.3 ms | 1395 KiB | 19 Q