Jörg: Seltsames Verhalten von count()?

Beitrag lesen

Hallo Forum,

ich habe folgenden Quellcode:

echo("<pre>");
print_r($myArray);

if(count($myArray > 0)) {
echo "Hello World";
exit;
//... usw.
}

Der ergibt in der Ausgabe:

Array
(
    [0] => Array
        (
            [0] => Array
                (
                    [0] => 6796
                    [1] => 33857_18072022125416_62d53bdd18482ee5d247e54c88b82ce2dc121dbd8f3582
                    [2] => pdf
                    [3] => 245168
                    [4] => qa
                    [5] => 18-07-2022
                    [6] => 
                    [7] => 
                    [8] => 
                )

            [1] => Array
                (
                    [0] => 6795
                    [1] => 4173_33857_18072022120610_62d5309345c34437786c5645a79f2d09e29b9db92b0a44
                    [2] => pdf
                    [3] => 241411
                    [4] => qq
                    [5] => 18-07-2022
                    [6] => 
                    [7] => 
                    [8] => 
                )

        )

    [1] => Array
        (
            [0] => Array
                (
                    [0] => 7281
                    [1] => 34141_10082022101805_62f369bfd5988b6c35c7a8e521b6967e8f056d3bd0258c
                    [2] => pdf
                    [3] => 237962
                    [4] => qa
                    [5] => 10-08-2022
                    [6] => 
                    [7] => 
                    [8] => 
                )

            [1] => Array
                (
                    [0] => 7276
                    [1] => 4527_34141_10082022100425_62f3668243d328e1e8d6a934aa00037818f398c89087dc
                    [2] => pdf
                    [3] => 239846
                    [4] => qq
                    [5] => 10-08-2022
                    [6] => 
                    [7] => 
                    [8] => 
                )
        )
)

Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in

Ist mein assoziatives Array für count() seit php 8 nicht mehr Array genug?

Jörg