In JavaScript I have a habit of using the following fallback evaluation
var width = parseInt(e.style.width) || e.offsetWidth() || 480
meaning width will get the last non-zero (non-null...) value
However, in php I can't write
$a = $_GET['id'] || 1;
I have to write so
$a = $_GET['id']?$_GET['id']:1;
Which is bad because $_GET['id'] is evaluated twice
Any suggestions?