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]; $days; $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/SfOCh
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_FCALL                                               'daycount'
          1        SEND_VAL                                                 '15%3A01%3A2012'
          2        DO_FCALL                                      0          
   27     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/SfOCh
function name:  dayCount
number of ops:  20
compiled vars:  !0 = $date, !1 = $day, !2 = $month, !3 = $days, !4 = $months, !5 = $i
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
   13     9        ASSIGN                                                   !4, <array>
   15    10        ASSIGN                                                   !5, 0
         11      > JMP                                                      ->15
   17    12    >   FETCH_DIM_R                                      ~16     !4, !5
         13        ASSIGN_OP                                     1          !3, ~16
   15    14        PRE_INC                                                  !5
         15    >   IS_SMALLER                                               !5, !2
         16      > JMPNZ                                                    ~19, ->12
   20    17    >   ASSIGN_OP                                     1          !3, !1
   22    18        ECHO                                                     !3
   23    19      > RETURN                                                   null

End of function daycount

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.35 ms | 1399 KiB | 14 Q