26.07.2018, 23:22
Quote:
TIL
This works PHP код:
People are saying that if(arr[1 || 2]) is invalid syntax... But today I checked it works. |
pawn Код:
new arr[2] = {1};
if(arr[0 || 1]) {
print("It works!");
} else {
print("It doesn't work."); // Expected output, because arr[0 || 1] returns true (1) and arr[1] doesn't exist.
}