3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = array('foo', null, 'bar', false, 5); $data = $original; print_r($data); foreach ($data as $key => $value) { if ($value === null) { unset($data[$key]); } } print_r($data); $data = $original; $data = array_filter($data, function ($value) { return $value === null; }); print_r($data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 11
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/YUi0v
function name:  (null)
number of ops:  27
compiled vars:  !0 = $original, !1 = $data, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, !0
    6     2        INIT_FCALL                                               'print_r'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                                 
    8     5      > FE_RESET_R                                       $7      !1, ->12
          6    > > FE_FETCH_R                                       ~8      $7, !2, ->12
          7    >   ASSIGN                                                   !3, ~8
    9     8        TYPE_CHECK                                    2          !2
          9      > JMPZ                                                     ~10, ->11
   10    10    >   UNSET_DIM                                                !1, !3
    8    11    > > JMP                                                      ->6
         12    >   FE_FREE                                                  $7
   14    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   16    16        ASSIGN                                                   !1, !0
   18    17        INIT_FCALL                                               'array_filter'
         18        SEND_VAR                                                 !1
         19        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FYUi0v%3A18%240'
   20    20        SEND_VAL                                                 ~13
         21        DO_ICALL                                         $14     
   18    22        ASSIGN                                                   !1, $14
   22    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FYUi0v%3A18%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.73 ms | 1396 KiB | 17 Q