3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myIsset($value) { return isset($value); } $array1 = array( 'str' => 'foo', 'null1' => null, 'null2' => null, 'bool' => true, ); $filtered_array1 = array_filter($array1, 'myIsset'); var_dump($array1, $filtered_array1, array_diff($array1, $filtered_array1)); $array2 = $array1; $array2['bool'] = false; $filtered_array2 = array_filter($array2, 'myIsset'); var_dump($array2, $filtered_array2, array_diff($array2, $filtered_array2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ImPeJ
function name:  (null)
number of ops:  33
compiled vars:  !0 = $array1, !1 = $filtered_array1, !2 = $array2, !3 = $filtered_array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'myIsset'
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
   17     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        INIT_FCALL                                               'array_diff'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                                 
   19    15        ASSIGN                                                   !2, !0
   20    16        ASSIGN_DIM                                               !2, 'bool'
         17        OP_DATA                                                  <false>
   22    18        INIT_FCALL                                               'array_filter'
         19        SEND_VAR                                                 !2
         20        SEND_VAL                                                 'myIsset'
         21        DO_ICALL                                         $11     
         22        ASSIGN                                                   !3, $11
   24    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !2
         25        SEND_VAR                                                 !3
         26        INIT_FCALL                                               'array_diff'
         27        SEND_VAR                                                 !2
         28        SEND_VAR                                                 !3
         29        DO_ICALL                                         $13     
         30        SEND_VAR                                                 $13
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Function myisset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ImPeJ
function name:  myIsset
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2      > RETURN                                                   ~1
    6     3*     > RETURN                                                   null

End of function myisset

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.01 ms | 1396 KiB | 19 Q