Star *¶
* is a character, used in various situations:
multiplication:
3 * 2 == 6power:
3 ** 2 == 3 * 3 == 9with slash,
/*is a multi line comment:/* */with double star and a slash,
/**is a phpdoc comment:/** */.as a wildcard in
glob()callsas a wildcard in
fnmatch()callsas a wildcard for all columns in SQL queries:
SELECT * FROM tableas a quantifier in regex: 0 or more, i.e.
/a*/as part of a multiline comment with
/** */and/* */.
<?php
file_get_contents('/tmp/test.txt');
echo 2 * 3; // 6
echo 2 ** 3; // *
/*
A multiline comment
*/
?>
Related : Multiplication, Comments, Exponential, Regular Expression, Structured Query Language (SQL), glob(), fnmatch()