3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = []; foreach ([0, '', null, false, ' ', '0', .0] as $v) { $k = match(true) { $v != null => '!= null', $v == null => '== null', // This should never occur. default => '?', }; $result[$k][] = $v; } var_export($result);

preferences:
29.89 ms | 404 KiB | 5 Q