3v4l.org

run code in 300+ PHP versions simultaneously
<?php $p = 3; $pMonth = "-$p month"; $startDate = new DateTime(); $startDate = $startDate->strtotime(''. $pMonth .'', $startDate); $startDate = $startDate->format('m-01-Y 00:00:00');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mUVjG
function name:  (null)
number of ops:  20
compiled vars:  !0 = $p, !1 = $pMonth, !2 = $startDate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 3
    5     1        ROPE_INIT                                     3  ~5      '-'
          2        ROPE_ADD                                      1  ~5      ~5, !0
          3        ROPE_END                                      2  ~4      ~5, '+month'
          4        ASSIGN                                                   !1, ~4
    6     5        NEW                                              $8      'DateTime'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $8
    7     8        INIT_METHOD_CALL                                         !2, 'strtotime'
          9        CONCAT                                           ~11     '', !1
         10        CONCAT                                           ~12     ~11, ''
         11        SEND_VAL_EX                                              ~12
         12        SEND_VAR_EX                                              !2
         13        DO_FCALL                                      0  $13     
         14        ASSIGN                                                   !2, $13
    8    15        INIT_METHOD_CALL                                         !2, 'format'
         16        SEND_VAL_EX                                              'm-01-Y+00%3A00%3A00'
         17        DO_FCALL                                      0  $15     
         18        ASSIGN                                                   !2, $15
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.84 ms | 1394 KiB | 13 Q