diff --git a/docs/css-classes-reference.rst b/docs/css-classes-reference.rst
index 70d45e4dc4..9cea743642 100644
--- a/docs/css-classes-reference.rst
+++ b/docs/css-classes-reference.rst
@@ -70,6 +70,8 @@ in mind so a better choice (for best theme support) might possibly be ``string``
+--------------------------+-------------------------------------------------------------+
| title.function | name of a function |
+--------------------------+-------------------------------------------------------------+
+| title.function.invoke | name of a function (when being invoked) |
++--------------------------+-------------------------------------------------------------+
| params | block of function arguments (parameters) at the |
| | place of declaration |
+--------------------------+-------------------------------------------------------------+
diff --git a/src/languages/php.js b/src/languages/php.js
index 4832f88d71..371ef2ae78 100644
--- a/src/languages/php.js
+++ b/src/languages/php.js
@@ -330,7 +330,7 @@ export default function(hljs) {
regex.lookahead(/(?=\()/)
],
scope: {
- 3: "function.title.invoke",
+ 3: "title.function.invoke",
}
};
diff --git a/test/markup/php/functions.expect.txt b/test/markup/php/functions.expect.txt
index 946c41bd67..f6bc43f49a 100644
--- a/test/markup/php/functions.expect.txt
+++ b/test/markup/php/functions.expect.txt
@@ -11,11 +11,11 @@
* Function invoke
*/
$date = new DateTimeImmutable ();
-$date->format('Y-m-d');
+$date->format('Y-m-d');
-DateTimeImmutable::createFromMutable(new \DateTime('now'));
+DateTimeImmutable::createFromMutable(new \DateTime('now'));
-str_contains (\strtoupper(substr('abcdef', -2), 'f'));
+str_contains (\strtoupper(substr('abcdef', -2), 'f'));