kphp
kphp copied to clipboard
empty function on tuples
Currently this code won't compile
$x = tuple(1, true);
var_dump(empty($x));
// error: no matching function for call to 'f$empty(std::tuple<long int, bool>&)'
But if we add implementation for tuple there is a bigger problem, empty on arrays
$results = [
tuple(1, true),
];
var_dump(
empty($results[0]), // false
empty($results[1]) // false
);
this could be solved by making empty an operation (like isset)