3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Asia/Tokyo'); for ($i = 0; $i < 10; $i++) { $date = new DateTime('2018-01-31'); $date->modify((int) ($i + 2).' month'); var_dump($date->format('Y-m-d H:i') ." → " . $date->format('Y-m-27')); echo PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 5
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 5
Branch analysis from position: 30
Branch analysis from position: 5
filename:       /in/WfDnT
function name:  (null)
number of ops:  31
compiled vars:  !0 = $i, !1 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'Asia%2FTokyo'
          2        DO_ICALL                                                 
    4     3        ASSIGN                                                   !0, 0
          4      > JMP                                                      ->28
    6     5    >   NEW                                              $4      'DateTime'
          6        SEND_VAL_EX                                              '2018-01-31'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $4
    7     9        INIT_METHOD_CALL                                         !1, 'modify'
         10        ADD                                              ~7      !0, 2
         11        CAST                                          4  ~8      ~7
         12        CONCAT                                           ~9      ~8, '+month'
         13        SEND_VAL_EX                                              ~9
         14        DO_FCALL                                      0          
    9    15        INIT_FCALL                                               'var_dump'
         16        INIT_METHOD_CALL                                         !1, 'format'
         17        SEND_VAL_EX                                              'Y-m-d+H%3Ai'
         18        DO_FCALL                                      0  $11     
         19        CONCAT                                           ~12     $11, '%E3%80%80%E2%86%92%E3%80%80'
         20        INIT_METHOD_CALL                                         !1, 'format'
         21        SEND_VAL_EX                                              'Y-m-27'
         22        DO_FCALL                                      0  $13     
         23        CONCAT                                           ~14     ~12, $13
         24        SEND_VAL                                                 ~14
         25        DO_ICALL                                                 
   11    26        ECHO                                                     '%0A'
    4    27        PRE_INC                                                  !0
         28    >   IS_SMALLER                                               !0, 10
         29      > JMPNZ                                                    ~17, ->5
   12    30    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.07 ms | 1396 KiB | 17 Q