PHP 8.4.0 Alpha 1 available for testing

Voting

: min(five, four)?
(Example: nine)

The Note You're Voting On

lucasfsmartins at gmail dot com
5 years ago
If you are on PHP 7.2+, you need to be aware of "Changelog" and use something like this:

<?php
$countFruits
= is_array($countFruits) || $countFruits instanceof Countable ? count($countFruits) : 0;
?>

You can organize your code to ensure that the variable is an array, or you can extend the Countable so that you don't have to do this check.

<< Back to user notes page

To Top -