3v4l.org

run code in 500+ PHP versions simultaneously
<?php $date = new \Datetime('2023-01-01 10:00:00', new \DateTimeZone('UTC')); $seconds = -100; $date->modify(sprintf('+%s seconds', $seconds)); // u can see its `+- 100 seconds` input string here echo $date->format('c');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Eq07c
function name:  (null)
number of ops:  20
compiled vars:  !0 = $date, !1 = $seconds
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $2      'Datetime'
          1        SEND_VAL_EX                                                  '2023-01-01+10%3A00%3A00'
          2        NEW                                                  $3      'DateTimeZone'
          3        SEND_VAL_EX                                                  'UTC'
          4        DO_FCALL                                          0          
          5        SEND_VAR_NO_REF_EX                                           $3
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !0, $2
    5     8        ASSIGN                                                       !1, -100
    7     9        INIT_METHOD_CALL                                             !0, 'modify'
         10        ROPE_INIT                                         3  ~9      '%2B'
         11        ROPE_ADD                                          1  ~9      ~9, !1
         12        ROPE_END                                          2  ~8      ~9, '+seconds'
         13        SEND_VAL_EX                                                  ~8
         14        DO_FCALL                                          0          
    9    15        INIT_METHOD_CALL                                             !0, 'format'
         16        SEND_VAL_EX                                                  'c'
         17        DO_FCALL                                          0  $12     
         18        ECHO                                                         $12
         19      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
115.86 ms | 474 KiB | 7 Q