When using two equals signs for PHP equality testing, some funky conversions take place.
TRUE | FALSE | 1 | 0 | -1 | "1" | "0" | "-1" | NULL | array() | "php" | "" | |
| TRUE | ||||||||||||
| FALSE | ||||||||||||
| 1 | ||||||||||||
| 0 | ||||||||||||
| -1 | ||||||||||||
| "1" | ||||||||||||
| "0" | ||||||||||||
| "-1" | ||||||||||||
| NULL | ||||||||||||
| array() | ||||||||||||
| "php" | ||||||||||||
| "" |
When using three equals signs for PHP equality testing, everything is as is. Nothing gets converted before being evaluated.
TRUE | FALSE | 1 | 0 | -1 | "1" | "0" | "-1" | NULL | array() | "php" | "" | |
| TRUE | ||||||||||||
| FALSE | ||||||||||||
| 1 | ||||||||||||
| 0 | ||||||||||||
| -1 | ||||||||||||
| "1" | ||||||||||||
| "0" | ||||||||||||
| "-1" | ||||||||||||
| NULL | ||||||||||||
| array() | ||||||||||||
| "php" | ||||||||||||
| "" |
Note: This row does not match up with any of the rows in the other table.
| TRUE | |
| FALSE | |
| 1 | |
| 0 | |
| -1 | |
| "1" | |
| "0" | |
| "-1" | |
| NULL | |
| array() | |
| "php" | |
| "" |
Thanks goes out to dorey.github.io which I copied and pasted a lot from to create this.