3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = array('foo', null, 'bar', false, 5); $data = $original; 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 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/JvXvr
function name:  (null)
number of ops:  24
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      > FE_RESET_R                                       $6      !1, ->9
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->9
          4    >   ASSIGN                                                   !3, ~7
    7     5        TYPE_CHECK                                    2          !2
          6      > JMPZ                                                     ~9, ->8
    8     7    >   UNSET_DIM                                                !1, !3
    6     8    > > JMP                                                      ->3
          9    >   FE_FREE                                                  $6
   12    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
   14    13        ASSIGN                                                   !1, !0
   16    14        INIT_FCALL                                               'array_filter'
         15        SEND_VAR                                                 !1
         16        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJvXvr%3A16%240'
   18    17        SEND_VAL                                                 ~12
         18        DO_ICALL                                         $13     
   16    19        ASSIGN                                                   !1, $13
   20    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FJvXvr%3A16%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
216.62 ms | 1396 KiB | 17 Q