- var_export: documentation ( source)
<?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);