I have this:
function boo($show_one = false){
if(!show_one) return 1; else return 2;
}
how can I call boo like this:
boo(SHOW_ALL);
instead of boo(false).
I see some native php function have parameters like that which make the code more easy to read
would correspond to your code there. But I’d reccomend using numbers instead of booleans. What if next weeks you decide to have a SHOW_PAGINATED option?