Star *

* is a character, used in various situations:

  • multiplication: 3 * 2 == 6

  • power: 3 ** 2 == 3 * 3 == 9

  • with slash, /* is a multi line comment: /* */

  • with double star and a slash, /** is a phpdoc comment: /** */.

  • as a wildcard in glob() calls

  • as a wildcard in fnmatch() calls

  • as a wildcard for all columns in SQL queries: SELECT * FROM table

  • as 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()