3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time_begin = strtotime("2012-07-03"); $time_end = strtotime("2014-03-12"); $time_differ = $time_end - $time_begin; $year_differ = date('Y', $time_differ); $month_differ = date('m', $time_differ); echo 12*intval($year_differ-1970)+intval($month_differ)-1;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lYjZ0
function name:  (null)
number of ops:  28
compiled vars:  !0 = $time_begin, !1 = $time_end, !2 = $time_differ, !3 = $year_differ, !4 = $month_differ
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '2012-07-03'
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
    3     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '2014-03-12'
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !1, $7
    4     8        SUB                                              ~9      !1, !0
          9        ASSIGN                                                   !2, ~9
    5    10        INIT_FCALL                                               'date'
         11        SEND_VAL                                                 'Y'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !3, $11
    6    15        INIT_FCALL                                               'date'
         16        SEND_VAL                                                 'm'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $13     
         19        ASSIGN                                                   !4, $13
    7    20        SUB                                              ~15     !3, 1970
         21        CAST                                          4  ~16     ~15
         22        MUL                                              ~17     ~16, 12
         23        CAST                                          4  ~18     !4
         24        ADD                                              ~19     ~17, ~18
         25        SUB                                              ~20     ~19, 1
         26        ECHO                                                     ~20
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.79 ms | 1395 KiB | 17 Q