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]; print $day; $month = $date[3] + $date[4]; print $month; $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/DelYN
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   INIT_FCALL                                               'daycount'
          1        SEND_VAL                                                 '15%3A01%3A2012'
          2        DO_FCALL                                      0          
   29     3      > RETURN                                                   1

Function daycount:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 14
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 14
Branch analysis from position: 19
Branch analysis from position: 14
filename:       /in/DelYN
function name:  dayCount
number of ops:  22
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        ECHO                                                     !1
   12     6        FETCH_DIM_R                                      ~10     !0, 3
          7        FETCH_DIM_R                                      ~11     !0, 4
          8        ADD                                              ~12     ~10, ~11
          9        ASSIGN                                                   !2, ~12
   13    10        ECHO                                                     !2
   15    11        ASSIGN                                                   !3, <array>
   17    12        ASSIGN                                                   !4, 0
         13      > JMP                                                      ->17
   19    14    >   FETCH_DIM_R                                      ~16     !3, !4
         15        ASSIGN_OP                                     1          !5, ~16
   17    16        PRE_INC                                                  !4
         17    >   IS_SMALLER                                               !4, !2
         18      > JMPNZ                                                    ~19, ->14
   22    19    >   ASSIGN_OP                                     1          !5, !1
   24    20        ECHO                                                     !5
   25    21      > RETURN                                                   null

End of function daycount

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.22 ms | 1399 KiB | 14 Q