3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_odd($var) { return in_array ( 'Program_Director' , $var); } $a1=array("Program_Director","Consultant",2,3,4); print_r(array_filter($a1,"test_odd"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0pgHK
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'test_odd'
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function test_odd:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0pgHK
function name:  test_odd
number of ops:  7
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'in_array'
          2        SEND_VAL                                                 'Program_Director'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
    7     6*     > RETURN                                                   null

End of function test_odd

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.4 ms | 1395 KiB | 19 Q