I've used ternary operators for a while and was wondering if there was a method to let say call a function without the else
clause. Example:
if (isset($foo)) {
callFunction();
} else {
}
Now obviously we can leave out the else
to make:
if (isset($foo)) {
callFunction();
}
Now for a ternary How can you 'by pass' the else clause if the condition returns false?
isset($foo) ? callFunction() : 'do nothing!!';
Either a mystery or not possible?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…