Yes
(exists == 1) ? execute_function() : false;
runs the function if true else wont exists
Added: It is best to do the following:
if( A == 1 ) { execute_function(); }
As the use of the ternary operator in the above case is not so fruitful, since you check only the true side of the condition and do not care about what is on the false side.
source share