3v4l.org

run code in 300+ PHP versions simultaneously
<?php function odd ( $var ) { // returns whether the input integer is odd return( $var & 1 ); } function even ( $var ) { // returns whether the input integer is even return(!( $var & 1 )); } $array1 = array( "a" => 1 , "b" => 2 , "c" => 3 , "d" => 4 , "e" => 5 ); $array2 = array( 6 , 7 , 8 , 9 , 10 , 11 , 12 ); echo "Odd :\n" ; print_r ( array_filter ( $array1 , "odd" )); echo "Even:\n" ; print_r ( array_filter ( $array2 , "even" ));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fnq2n
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array1, !1 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN                                                   !0, <array>
   16     1        ASSIGN                                                   !1, <array>
   18     2        ECHO                                                     'Odd+%3A%0A'
   19     3        INIT_FCALL                                               'print_r'
          4        INIT_FCALL                                               'array_filter'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'odd'
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
   20    10        ECHO                                                     'Even%3A%0A'
   21    11        INIT_FCALL                                               'print_r'
         12        INIT_FCALL                                               'array_filter'
         13        SEND_VAR                                                 !1
         14        SEND_VAL                                                 'even'
         15        DO_ICALL                                         $6      
         16        SEND_VAR                                                 $6
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function odd:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fnq2n
function name:  odd
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    6     1        BW_AND                                           ~1      !0, 1
          2      > RETURN                                                   ~1
    7     3*     > RETURN                                                   null

End of function odd

Function even:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fnq2n
function name:  even
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   12     1        BW_AND                                           ~1      !0, 1
          2        BOOL_NOT                                         ~2      ~1
          3      > RETURN                                                   ~2
   13     4*     > RETURN                                                   null

End of function even

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.2 ms | 1396 KiB | 17 Q