3v4l.org

run code in 300+ PHP versions simultaneously
<?php $thirtyOnedayMonths = array( 1, 3, 5, 7, 8, 10, 12 ); $format = 'Y-m-d'; foreach($thirtyOnedayMonths as $month){ $date = date($format, strtotime('-1 month', strtotime("2013-{$month}-31 00:00:01"))); var_dump($date); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 23
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/QM8SI
function name:  (null)
number of ops:  25
compiled vars:  !0 = $thirtyOnedayMonths, !1 = $format, !2 = $month, !3 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, 'Y-m-d'
    8     2      > FE_RESET_R                                       $6      !0, ->23
          3    > > FE_FETCH_R                                               $6, !2, ->23
    9     4    >   INIT_FCALL                                               'date'
          5        SEND_VAR                                                 !1
          6        INIT_FCALL                                               'strtotime'
          7        SEND_VAL                                                 '-1+month'
          8        INIT_FCALL                                               'strtotime'
          9        ROPE_INIT                                     3  ~8      '2013-'
         10        ROPE_ADD                                      1  ~8      ~8, !2
         11        ROPE_END                                      2  ~7      ~8, '-31+00%3A00%3A01'
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                         $10     
         14        SEND_VAR                                                 $10
         15        DO_ICALL                                         $11     
         16        SEND_VAR                                                 $11
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !3, $12
   10    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
    8    22      > JMP                                                      ->3
         23    >   FE_FREE                                                  $6
   11    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.96 ms | 1395 KiB | 19 Q