diff --git a/Writerside/topics/language.md b/Writerside/topics/language.md index a30a8a1..2991e5b 100644 --- a/Writerside/topics/language.md +++ b/Writerside/topics/language.md @@ -7,8 +7,21 @@ static code analysis tools: [PHPStan](https://phpstan.org/) and [Psalm](https:// - PHPStan: [https://phpstan.org](https://phpstan.org/writing-php-code/phpdoc-types) - Psalm: [https://psalm.dev](https://psalm.dev/docs/annotating_code/type_syntax/atomic_types/) -- PHAN: [https://github.com/phan](https://github.com/phan/phan/wiki) -- phpDocumentor: [https://docs.phpdoc.org](https://docs.phpdoc.org/guide/guides/types.html) + + +There are others that are not currently tested for compatibility. +For example: + +
  • PHAN: https://github.com/phan
  • +
  • phpDocumentor: https://docs.phpdoc.org
  • +
    + +If you wish, you can add information about this software using a + + pull request to the documentation +. +
    + > Below is a comparison list of all syntactic structures (grammar). > The logical component (the physical existence of the type) is **NOT** @@ -70,24 +83,18 @@ Below is a list of simple, logical and other common types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    +  TypeLang +  Psalm +  PHPStan -  PHAN - -  phpDocumentor -
    + Class or type name (including FQN) @@ -101,11 +108,9 @@ Below is a list of simple, logical and other common types.
    + Logical union types @@ -119,11 +124,9 @@ Below is a list of simple, logical and other common types.
    + Logical intersection types @@ -137,11 +140,9 @@ Below is a list of simple, logical and other common types.
    + Logical nullable types @@ -155,11 +156,9 @@ Below is a list of simple, logical and other common types.
    + Legacy list types syntax @@ -173,11 +172,9 @@ Below is a list of simple, logical and other common types.
    + Template arguments (Generics) @@ -196,12 +193,10 @@ Below is a list of simple, logical and other common types.
    + @@ -213,7 +208,7 @@ Below is a list of simple, logical and other common types.
    + Template argument hints @@ -237,12 +232,10 @@ Below is a list of simple, logical and other common types. Call-site variance 2
    + @@ -270,16 +263,6 @@ Below is a list of simple, logical and other common types. 7/7 - - ?/7 - - - - ?/7 - -
    @@ -290,24 +273,18 @@ Below is a list of conditional types. - - - - - - - - - - - - - - - - - - - - - - - - @@ -488,16 +453,6 @@ Below is a list of conditional types. 4/6 - -
    +  TypeLang +  Psalm +  PHPStan -  PHAN - -  phpDocumentor -
    + Conditional positive equality types @@ -321,11 +298,9 @@ Below is a list of conditional types.
    + Conditional negative equality types @@ -339,11 +314,9 @@ Below is a list of conditional types.
    + Conditional referenced types @@ -358,11 +331,9 @@ Below is a list of conditional types.
    + Conditional referenced types @@ -390,11 +361,9 @@ Below is a list of conditional types. Not Supported
    + Functions in conditional types @@ -409,12 +378,10 @@ Below is a list of conditional types. List of supported functions 1 List of supported functions 2
    + @@ -440,7 +407,7 @@ Below is a list of conditional types.
    + Functions in conditional types @@ -468,8 +435,6 @@ Below is a list of conditional types. Not Supported
    - - ?/7 - - - - ?/7 - -
    @@ -508,24 +463,18 @@ Below is a list of literal types/lexemes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1027,16 +938,6 @@ Below is a list of literal types/lexemes. 11/19 - -
    +  TypeLang +  Psalm +  PHPStan -  PHAN - -  phpDocumentor -
    + Boolean true and false literals @@ -540,11 +489,9 @@ Below is a list of literal types/lexemes.
    + The null literals @@ -558,11 +505,9 @@ Below is a list of literal types/lexemes.
    + Single-quoted string literals @@ -576,11 +521,9 @@ Below is a list of literal types/lexemes.
    + Double-quoted string literals @@ -594,11 +537,9 @@ Below is a list of literal types/lexemes.
    + Escape sequences in a double-quoted string literals @@ -622,11 +563,9 @@ Below is a list of literal types/lexemes. Not Supported
    + Hexadecimal sequences in a double-quoted string literals @@ -650,11 +589,9 @@ Below is a list of literal types/lexemes. Not Supported
    + Unicode sequences in a double-quoted string literals @@ -678,11 +615,9 @@ Below is a list of literal types/lexemes. Not Supported
    + Integer literals @@ -696,11 +631,9 @@ Below is a list of literal types/lexemes.
    + BigInteger (PHP_INT_MAX + 1 or PHP_INT_MIN - 1) literals @@ -714,12 +647,10 @@ Below is a list of literal types/lexemes. Works with restrictions 1 Works with restrictions 2 Works with restrictions 3
    + @@ -761,7 +692,7 @@ Below is a list of literal types/lexemes.
    + Integer literals in binary format @@ -785,11 +716,9 @@ Below is a list of literal types/lexemes. Not Supported
    + Integer literals in octal format @@ -813,11 +742,9 @@ Below is a list of literal types/lexemes. Not Supported
    + Integer literals in legacy octal format @@ -841,11 +768,9 @@ Below is a list of literal types/lexemes. Not Supported
    + Integer literals in hexadecimal format @@ -869,11 +794,9 @@ Below is a list of literal types/lexemes. Not Supported
    + Float literals @@ -887,11 +810,9 @@ Below is a list of literal types/lexemes.
    + Float literals without leading zero @@ -910,11 +831,9 @@ Below is a list of literal types/lexemes.
    + Float literals without trailing zero @@ -933,11 +852,9 @@ Below is a list of literal types/lexemes.
    + Float literals in scientific notation @@ -956,11 +873,9 @@ Below is a list of literal types/lexemes.
    + Float literals in scientific notation @@ -979,11 +894,9 @@ Below is a list of literal types/lexemes.
    + Float hexadecimal literals in scientific notation @@ -1007,8 +920,6 @@ Below is a list of literal types/lexemes. Not Supported
    - - ?/19 - - - - ?/19 - -
    @@ -1048,24 +949,18 @@ Below is a list of grammar of shaped types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    +  TypeLang +  Psalm +  PHPStan -  PHAN - -  phpDocumentor -
    + Explicit shape types @@ -1081,12 +976,10 @@ Below is a list of grammar of shaped types. Works with restrictions 1
    + @@ -1107,7 +1000,7 @@ Below is a list of grammar of shaped types.
    + Trailing comma in explicit shape types @@ -1123,12 +1016,10 @@ Below is a list of grammar of shaped types. Works with restrictions 1
    + @@ -1149,7 +1040,7 @@ Below is a list of grammar of shaped types.
    + Implicit shape types @@ -1165,12 +1056,10 @@ Below is a list of grammar of shaped types. Works with restrictions 1
    + @@ -1191,7 +1080,7 @@ Below is a list of grammar of shaped types.
    + Trailing comma in implicit shape types @@ -1212,11 +1101,9 @@ Below is a list of grammar of shaped types.
    + Optional keys in explicit shape types @@ -1232,12 +1119,10 @@ Below is a list of grammar of shaped types. Works with restrictions 1
    + @@ -1258,7 +1143,7 @@ Below is a list of grammar of shaped types.
    + Empty (closed) shape types @@ -1272,12 +1157,10 @@ Below is a list of grammar of shaped types. Works with restrictions 1
    + @@ -1294,7 +1177,7 @@ Below is a list of grammar of shaped types.
    + Unsealed shape types @@ -1308,12 +1191,10 @@ Below is a list of grammar of shaped types. Works with restrictions 1
    + @@ -1330,7 +1211,7 @@ Below is a list of grammar of shaped types.
    + Explicit unsealed shape types @@ -1347,12 +1228,10 @@ Below is a list of grammar of shaped types. Works with restrictions 1
    + @@ -1375,7 +1254,7 @@ Below is a list of grammar of shaped types.
    + Implicit unsealed shape types @@ -1392,12 +1271,10 @@ Below is a list of grammar of shaped types. Works with restrictions 1
    + @@ -1420,7 +1297,7 @@ Below is a list of grammar of shaped types.
    + Typed unsealed shape types @@ -1436,12 +1313,10 @@ Below is a list of grammar of shaped types. Works with restrictions 1 Works with restrictions 1
    + @@ -1494,16 +1369,6 @@ Below is a list of grammar of shaped types. 10/10 - - ?/10 - - - - ?/10 - -
    @@ -1514,24 +1379,18 @@ Below is a list of grammar of callable (function) types. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    +  TypeLang +  Psalm +  PHPStan -  PHAN - -  phpDocumentor -
    + Non-typed callable types @@ -1550,11 +1409,9 @@ Below is a list of grammar of callable (function) types. Not Supported
    + Typed callable types @@ -1568,11 +1425,9 @@ Below is a list of grammar of callable (function) types.
    + Callable with typed parameters @@ -1586,11 +1441,9 @@ Below is a list of grammar of callable (function) types.
    + Callable with optional parameters @@ -1604,11 +1457,9 @@ Below is a list of grammar of callable (function) types.
    + Callable with named parameters @@ -1622,11 +1473,9 @@ Below is a list of grammar of callable (function) types.
    + Callable with optional named parameters @@ -1645,11 +1494,9 @@ Below is a list of grammar of callable (function) types.
    + Callable with output parameters @@ -1663,12 +1510,10 @@ Below is a list of grammar of callable (function) types. Works with restrictions 1
    + @@ -1686,7 +1531,7 @@ Below is a list of grammar of callable (function) types.
    + Callable with output optional parameters @@ -1700,12 +1545,10 @@ Below is a list of grammar of callable (function) types. Works with restrictions 1
    + @@ -1723,7 +1566,7 @@ Below is a list of grammar of callable (function) types.
    + Callable with output optional named parameters @@ -1742,11 +1585,9 @@ Below is a list of grammar of callable (function) types.
    + Callable with suffixed variadic parameters @@ -1760,11 +1601,9 @@ Below is a list of grammar of callable (function) types.
    + Callable with prefixed variadic parameters @@ -1783,11 +1622,9 @@ Below is a list of grammar of callable (function) types. Not Supported
    + Callable with prefixed and suffixed variadic parameters @@ -1801,12 +1638,10 @@ Below is a list of grammar of callable (function) types. Works with restrictions 1 Works with restrictions 2
    + This expression is incorrect because the "variadic" lexeme ... must be present in the parameter @@ -1834,7 +1669,7 @@ Below is a list of grammar of callable (function) types.
    + Callable with optional variadic parameters @@ -1854,12 +1689,10 @@ Below is a list of grammar of callable (function) types. No Error
    + This expression is incorrect because any variadic parameter is already optional. The parser must @@ -1881,7 +1714,7 @@ Below is a list of grammar of callable (function) types.
    + Callable with named variadic parameters @@ -1896,12 +1729,10 @@ Below is a list of grammar of callable (function) types. Works with restrictions 1 Works with restrictions 2
    + @@ -1923,7 +1754,7 @@ Below is a list of grammar of callable (function) types.
    + Callable with output named variadic parameters @@ -1938,12 +1769,10 @@ Below is a list of grammar of callable (function) types. Works with restrictions 1 Works with restrictions 2
    + @@ -1985,15 +1814,5 @@ Below is a list of grammar of callable (function) types. 12/15 - - ?/15 - - - - ?/10 - -