3v4l.org

run code in 300+ PHP versions simultaneously
<?php function filter() { return array_filter(array('foo' => 42, 'bar' => 50), function ($val) { return $val == 50; }); } function map() { return array_map(function ($val) { return $val*2; }, array('foo' => 84, 'bar' => 25)); } for ($i = 0; $i < 100; $i++) { filter(); map(); } var_dump(filter(), bar());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
Branch analysis from position: 2
filename:       /in/7NQMs
function name:  (null)
number of ops:  18
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->7
   11     2    >   INIT_FCALL                                               'filter'
          3        DO_FCALL                                      0          
   12     4        INIT_FCALL                                               'map'
          5        DO_FCALL                                      0          
   10     6        PRE_INC                                                  !0
          7    >   IS_SMALLER                                               !0, 100
          8      > JMPNZ                                                    ~5, ->2
   15     9    >   INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'filter'
         11        DO_FCALL                                      0  $6      
         12        SEND_VAR                                                 $6
         13        INIT_FCALL_BY_NAME                                       'bar'
         14        DO_FCALL                                      0  $7      
         15        SEND_VAR                                                 $7
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Function filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7NQMs
function name:  filter
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'array_filter'
          1        SEND_VAL                                                 <array>
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F7NQMs%3A4%240'
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
    5     6*     > RETURN                                                   null

End of function filter

Function %00%7Bclosure%7D%2Fin%2F7NQMs%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7NQMs
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        IS_EQUAL                                         ~1      !0, 50
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F7NQMs%3A4%240

Function map:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7NQMs
function name:  map
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'array_map'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F7NQMs%3A7%241'
          2        SEND_VAL                                                 ~0
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
    8     6*     > RETURN                                                   null

End of function map

Function %00%7Bclosure%7D%2Fin%2F7NQMs%3A7%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7NQMs
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        MUL                                              ~1      !0, 2
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F7NQMs%3A7%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.33 ms | 1394 KiB | 22 Q