Is there any other use of the question mark ?
in PHP other than being part as the Ternary Operator.
Just to take note: I know about how it works in regex and all that. I am talking about the PHP language itself, not regex or what. I know how it works in opening and closing tags.
I am more concerned about tokenizing a PHP script. Is there any other token invol开发者_如何学JAVAving question mark?
I've already checked the PHP manual by the way.
Well yeah in php it is used for:
<?php / ?>
opening tags.<? ?>
short opening tags.<?= $variable ?>
equivalent to useful when working with templates.?:
ternary operator- And is used in preg_match() when writing regular expressions.
^\s+(\s+)?$
For one, it is used to mark up the PHP code itself like this <? ?>
:)
But seriously, are you driving at some particular use you wanted to understand?
精彩评论