3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 0 => null, 1 => null, 2 => null ); if (count(array_keys($array, null, true)) != count($array)) { echo 'true'; } /* if(array_filter($array)) { echo "true\n"; } else echo "false\n"; $array[1] = "test"; if (array_filter($array)) { echo "true\n"; } else echo "false\n"; */
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/kRNJ8
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'array_keys'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 null
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $2      
          6        COUNT                                            ~3      $2
          7        COUNT                                            ~4      !0
          8        IS_NOT_EQUAL                                             ~3, ~4
          9      > JMPZ                                                     ~5, ->11
   10    10    >   ECHO                                                     'true'
   23    11    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.02 ms | 1385 KiB | 15 Q