3v4l.org

run code in 300+ PHP versions simultaneously
<?php $aArray = array("0"=> "toto", "user" => "sdfdmlsfk", "1" => "sdfdsf"); $callback = function($key, $value) { if (is_numeric($key)) { return $value; } return null; }; $values = array_filter($aArray, $callback, ARRAY_FILTER_USE_BOTH); var_dump($values);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s0RRn
function name:  (null)
number of ops:  13
compiled vars:  !0 = $aArray, !1 = $callback, !2 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fs0RRn%3A5%240'
          2        ASSIGN                                                   !1, ~4
   11     3        INIT_FCALL                                               'array_filter'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 1
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
   12     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fs0RRn%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s0RRn
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        INIT_FCALL                                               'is_numeric'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->7
    7     6    > > RETURN                                                   !1
    9     7    > > RETURN                                                   null
   10     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fs0RRn%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.76 ms | 1400 KiB | 19 Q