3v4l.org

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

Function c:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ENSYD
function name:  c
number of ops:  5
compiled vars:  !0 = $d, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        BIND_GLOBAL                                              !1, 'b'
          2        IS_EQUAL                                         ~2      !0, !1
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of function c

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.6 ms | 1395 KiB | 17 Q