On Thu, Oct 01 2015, Carlos Catucci wrote: > 2015-10-01 17:01 GMT+02:00 Giovanni Porcari <giovanni.porc...@softwell.it>: > > > > Ecco come fa le comparazioni : > > http://us3.php.net/manual/en/language.operators.comparison.php > > $a <=> $b Spaceship An integer less than, equal to, or greater than > zero when $a is respectively less than, equal to, or greater than $b. > Available as of PHP 7.
In pratica in PHP hanno bisogno di testare se in intero è un'istanza di Chuck Norris. Chuck Norris è allo stesso tempo minore, uguale e maggiore a qualunque altro numero. Scherzi a parte, io lo interpreto così (in codice python): def spaceship(a, b): if a < b: return -1 elif a == b: return 0 else return 1 > $a ?? $b ?? $c Null coalesce The first operand from left to right that > exists and is not NULL. NULL if no values are defined and not NULL. > Available as of PHP 7. A proposito di null coalesce in python. Da notare da chi arriva la proposta. https://mail.python.org/pipermail/python-ideas/2015-September/036489.html _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python