3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $items = false; $quantity = count($items); // default return value 1 with scalars unless var is null if ( $quantity > 0) { echo "Sending you $quantity item(s)"; }
Output for 7.2.0
Warning: count(): Parameter must be an array or an object that implements Countable in /in/ZAaPP on line 3 Sending you 1 item(s)
Output for 4.3.0 - 7.1.10
Sending you 1 item(s)