3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nr = 2; $a = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); $a = array_filter($a, create_function('$e', ' global $nr; return $e % $nr == 0; ')); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YdeMv
function name:  (null)
number of ops:  15
compiled vars:  !0 = $nr, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 2
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !1
          4        INIT_FCALL_BY_NAME                                       'create_function'
          5        SEND_VAL_EX                                              '%24e'
          6        SEND_VAL_EX                                              '%0A++++++++global+%24nr%3B%0A++++++++return+%24e+%25+%24nr+%3D%3D+0%3B%0A++++'
          7        DO_FCALL                                      0  $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
    8    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.35 ms | 1000 KiB | 15 Q