Slash /¶
/ is character, used in various situations:
decimal division:
3 / 2Path separator:
/user/php/document.txtRegex delimiter:
/[abc]/i, very frequent but not the only oneRegex escape char:
/a\.b/iDouble slash is the marker of a comment:
// a comment till the end of the lineWith star,
/*is a multi line comment:/* */With double star,
/**is a phpdoc comment:/** */stripslashes()removes slashes used for escaping, in stringsaddslashes()adds slashes for escaping, in stringsaddcslashes()adds slashes for escaping arbitrary characters
The slash looks like the back-slash character \, though they have very different use.
<?php
file_get_contents('/tmp/test.txt');
echo 1234 / 2;
// Just a comment
?>
Related : Backslash , Escape Character, Portability, Pound #