Search Results
Parameters ¶ string The PHP code to be highlighted. This should include the opening tag. return Set this parameter to true to make this function return the highlighted code.
Definition and Usage The highlight_string () function outputs a string with the PHP syntax highlighted. The string is highlighted by using HTML tags. The colors used for syntax highlighting can be set in the php.ini file or with the ini_set () function.
Jul 11, 2025 · Return Value: If it is True then it returns highlighted code as a string, otherwise false on failure. Below programs illustrate the highlight_string () function in PHP.
Jan 26, 2023 · La fonction highlight_string () en PHP prend une chaîne de code PHP comme paramètre et renvoie le code sous forme de chaîne avec des balises HTML ajoutées pour la coloration syntaxique.
Valeurs de retour Si le second paramètre optionnel return est fourni, et vaut true alors highlight_string () retournera la chaîne colorisée au lieu de l'afficher immédiatement. Si le second paramètre ne vaut pas true alors highlight_string () retournera true en cas de succès, et false sinon.
In this article, we will focus on the PHP highlight_string () function. We will provide you with an overview of the function, how it works, and examples of its
Outputs or returns a syntax highlighted version of the given PHP code using the colors defined in the built-in syntax highlighter for PHP.
