On the criticisms of PHP on swap, those are way out of date. Swap in php:
list(a, b) = [b, a]
Multiple return values:
[a, b] = function(){ return ["one value", "another"];};
list(a, b) = [b, a]
Multiple return values:
[a, b] = function(){ return ["one value", "another"];};
list($a, $b) = [$b, $a];
list($a, $b) = (function(){ return ["one value", "another"];})();
Anyway, it's not even out-of-date, just ignorant. PHP has list() for at least 16 years.