3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * bool isEven(int $number) * * use it to prove if a number is even or no * * @param int $number the number that you want to check * @return bool returns TRUE if the number is even, otherwise returns FALSE */ function isEven($number) { if(!($number % 2)) { return TRUE; } return FALSE; } print_r(isEven(2)); echo '<br>'; print_r(isEven(3)); echo '<br>'; print_r(isEven(50)); echo '<br>'; print_r(isEven(53));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Ip8i
function name:  (null)
number of ops:  28
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'iseven'
          2        SEND_VAL                                                 2
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   21     6        ECHO                                                     '%3Cbr%3E'
   22     7        INIT_FCALL                                               'print_r'
          8        INIT_FCALL                                               'iseven'
          9        SEND_VAL                                                 3
         10        DO_FCALL                                      0  $2      
         11        SEND_VAR                                                 $2
         12        DO_ICALL                                                 
   23    13        ECHO                                                     '%3Cbr%3E'
   24    14        INIT_FCALL                                               'print_r'
         15        INIT_FCALL                                               'iseven'
         16        SEND_VAL                                                 50
         17        DO_FCALL                                      0  $4      
         18        SEND_VAR                                                 $4
         19        DO_ICALL                                                 
   25    20        ECHO                                                     '%3Cbr%3E'
   26    21        INIT_FCALL                                               'print_r'
         22        INIT_FCALL                                               'iseven'
         23        SEND_VAL                                                 53
         24        DO_FCALL                                      0  $6      
         25        SEND_VAR                                                 $6
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Function iseven:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Ip8i
function name:  isEven
number of ops:  7
compiled vars:  !0 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        MOD                                              ~1      !0, 2
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->5
   14     4    > > RETURN                                                   <true>
   16     5    > > RETURN                                                   <false>
   18     6*     > RETURN                                                   null

End of function iseven

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.42 ms | 1403 KiB | 19 Q