3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Count the number of days since the beginning of the year. // // DD:MM:YYYY function dayCount($date) { $day = $date[0] + $date[1]; $month = $date[3] + $date[4]; $months = array(31,28,31,30,31,30,31,31,30,31,30,31); for ($i = 0; $i < $month; $i++) { $days += $months[$i]; } $days += $day; print $days; } dayCount("15:01:2012"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RPOnb
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'daycount'
          1        SEND_VAL                                                 '15%3A01%3A2012'
          2        DO_FCALL                                      0          
   26     3      > RETURN                                                   1

Function daycount:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 12
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 12
Branch analysis from position: 17
Branch analysis from position: 12
filename:       /in/RPOnb
function name:  dayCount
number of ops:  20
compiled vars:  !0 = $date, !1 = $day, !2 = $month, !3 = $months, !4 = $i, !5 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        FETCH_DIM_R                                      ~6      !0, 0
          2        FETCH_DIM_R                                      ~7      !0, 1
          3        ADD                                              ~8      ~6, ~7
          4        ASSIGN                                                   !1, ~8
   10     5        FETCH_DIM_R                                      ~10     !0, 3
          6        FETCH_DIM_R                                      ~11     !0, 4
          7        ADD                                              ~12     ~10, ~11
          8        ASSIGN                                                   !2, ~12
   12     9        ASSIGN                                                   !3, <array>
   14    10        ASSIGN                                                   !4, 0
         11      > JMP                                                      ->15
   16    12    >   FETCH_DIM_R                                      ~16     !3, !4
         13        ASSIGN_OP                                     1          !5, ~16
   14    14        PRE_INC                                                  !4
         15    >   IS_SMALLER                                               !4, !2
         16      > JMPNZ                                                    ~19, ->12
   19    17    >   ASSIGN_OP                                     1          !5, !1
   21    18        ECHO                                                     !5
   22    19      > RETURN                                                   null

End of function daycount

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.94 ms | 1399 KiB | 14 Q