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 = strtok($date, ":"); print $day; $month = strtok(":"); 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/79Q0I
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 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 15
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 15
Branch analysis from position: 20
Branch analysis from position: 15
filename:       /in/79Q0I
function name:  dayCount
number of ops:  23
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        INIT_FCALL                                               'strtok'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%3A'
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
   10     6        ECHO                                                     !1
   12     7        INIT_FCALL                                               'strtok'
          8        SEND_VAL                                                 '%3A'
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
   13    11        ECHO                                                     !2
   15    12        ASSIGN                                                   !3, <array>
   17    13        ASSIGN                                                   !4, 0
         14      > JMP                                                      ->18
   19    15    >   FETCH_DIM_R                                      ~12     !3, !4
         16        ASSIGN_OP                                     1          !5, ~12
   17    17        PRE_INC                                                  !4
         18    >   IS_SMALLER                                               !4, !2
         19      > JMPNZ                                                    ~15, ->15
   22    20    >   ASSIGN_OP                                     1          !5, !1
   24    21        ECHO                                                     !5
   25    22      > RETURN                                                   null

End of function daycount

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.13 ms | 1399 KiB | 16 Q