3v4l.org

run code in 300+ PHP versions simultaneously
<?php function calendar_week_mod( $num ) { $base = 7; return ( $num - $base * floor( $num / $base ) ); } echo calendar_week_mod('asd');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SLlHH
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'calendar_week_mod'
          1        SEND_VAL                                                 'asd'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function calendar_week_mod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SLlHH
function name:  calendar_week_mod
number of ops:  10
compiled vars:  !0 = $num, !1 = $base
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, 7
    5     2        INIT_FCALL                                               'floor'
          3        DIV                                              ~3      !0, !1
          4        SEND_VAL                                                 ~3
          5        DO_ICALL                                         $4      
          6        MUL                                              ~5      !1, $4
          7        SUB                                              ~6      !0, ~5
          8      > RETURN                                                   ~6
    6     9*     > RETURN                                                   null

End of function calendar_week_mod

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.06 ms | 1401 KiB | 16 Q