PHP addcslashes() FunctionLast Updated : 17 Mar 2025 PHP addcslashes() function is used to add quote string with slashes in a C style. It is case-sensitive Syntax:
Example 1Output: Your String : Welcome to JavaTpoint By using 'addcslashes()' method your string: Welcome to Java\Tpoint Example 2Output: Your String : Welcome to JavaTpoint By using 'addcslashes()' method your string: Welcome to J\av\aTpoint Example 3Output: Welcome to JavaTpoint \Welcome to \Java\Tpoint Example 4Output: Welcome to JavaTpint W\e\l\c\o\m\e \t\o J\a\v\aT\p\o\i\n\t<\b\r> Example 5Output: Your string value is: Welcome to JavaTpoint By using addcslashes() Function your value is : W\e\l\co\m\e to J\av\aTp\oint Next TopicPHP String |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India