Skip to content
Advertisement

Three curly brackets together in php source code

I just downloaded complete source code of PHP from php.net (PHP 5.4.0 [tar.bz2]). They are often using three curly brackets together as given below (The following code snippet extracted form ext/ctype/ctype.c.)

JavaScript

Does anyone have the idea why they are using these three curly brackets together?

Advertisement

Answer

They are vim fold markers, they make it easy to collapse and expand the text inbetween the triple curly braces in vim, in the example shown alternating between:

JavaScript

and just

JavaScript

If you look at the end of the file where you find them, you’ll often find a block like this:

JavaScript

Which is another more-obvious indicator that these comments relate to vim.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement