-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsyntax_test_php.php
37 lines (32 loc) · 1.23 KB
/
syntax_test_php.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// SYNTAX TEST "Packages/PHP/PHP.sublime-syntax"
<?php
function a($a = array(), $b = "hi") {};
function b($a = [], $b = "hi") {};
function c(array $a = array(), $b = "hi") {};
// ^ meta.function.argument.array
// ^ punctuation.definition.array.end
function d(array $a = [], $b = "hi") {};
// ^ meta.function.argument.array
// ^ punctuation.definition.array.end
function e(array $a = [1, 2, 3, 4], $b = "hi") {};
// ^ meta.function.argument.array
// ^ punctuation.definition.array.end
function f(array $a = null, $b = "hi") {};
function g(array $a = (), $b = "hi") {};
// ^ invalid.illegal.non-null-typehinted
function h(array $a = 1234, $b = "hi") {};
// ^ invalid.illegal.non-null-typehinted
/**
No longer a phpdoc comment since no leading *
* @return
// ^ comment.block - keyword.other.phpdoc
*/
// ^ source - comment.block
/**
* @return
// ^ keyword.other.phpdoc
*/
/* No phpdoc highlight since there are not two * after the opening /
* @return
// ^ comment.block - keyword.other.phpdoc
*/