Home  >  Article  >  Backend Development  >  What does slash mean in php

What does slash mean in php

藏色散人
藏色散人Original
2022-01-20 10:03:532470browse

There are two types of slashes in php, namely: 1. The forward slash "/" symbol, which is equivalent to a bracket wrapping the content; 2. The backslash "\" symbol, which represents an escape character .

What does slash mean in php

The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer

What do the slashes in php mean?

php The difference between forward slash '/' and backslash '\'

$val = preg_replace('/([\x00-\x08,\x0b-\x0c,\x0e-\x19])/', '', $val);

Forward slash is used to wrap the content equivalent to a bracket;

The backslash is:

Marks the next character as a special character, or a literal character, or a backward reference, or an octal escape character.

For example, 'n' matches the character "n". '\n' matches a newline character. The sequence '\\' matches "\" and "\(" matches "(".

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What does slash mean in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn