3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST['site'] = [1, 2, 3, '4foo', '5bar']; $sites = array_map(function ($val) { return filter_var($val, FILTER_SANITIZE_NUMBER_INT); }, $_POST['site']); print_r($sites);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D14bS
function name:  (null)
number of ops:  15
compiled vars:  !0 = $sites
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_W                      global              $1      '_POST'
          1        ASSIGN_DIM                                               $1, 'site'
          2        OP_DATA                                                  <array>
    4     3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FD14bS%3A4%240'
    6     5        SEND_VAL                                                 ~3
          6        FETCH_R                      global              ~4      '_POST'
          7        FETCH_DIM_R                                      ~5      ~4, 'site'
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                         $6      
    4    10        ASSIGN                                                   !0, $6
    8    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FD14bS%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D14bS
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'filter_var'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 519
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
    6     6*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.17 ms | 1395 KiB | 19 Q