S
S
Senseich2017-09-01 20:06:35
Programming
Senseich, 2017-09-01 20:06:35

What is escaping in PHP, JS? And what is it used for?

Can someone clearly explain what escaping is in PHP, JS?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2017-09-01
@Maksclub

echo 'Однажды Арнольд сказал: "I'll be back"';
will display an error, because after the letter there Iis a closing quote of the echo command, and then for PHP there is a bunch of garbage not from the PHP syntax
, but the code: it will display: Once Arnold said: "I'll be back" by the way, the syntax was correctly highlighted by the editor, pay attention to red code color ... There is a lot of escaping in regular expressions, as there are many special characters involved, and these characters should be, for example, in the text (brackets and hyphens in the phone), although brackets and hyphens themselves can be constructions of the same expressions ... not to confuse - they escape non-service (in the syntax of the language) characters A whole article for fixing https://habrahabr.ru/post/182424/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question