# Allowing type alias for built-in types

- Thread: https://externals.io/message/118692
- Original archive: https://news-web.php.net/php.internals/118692
- Started by olle.haerstedt@limesurvey.org on 2022-09-26T12:36:46+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #118692 — olle.haerstedt@limesurvey.org — 2022-09-26T12:36:46+00:00

URL: https://externals.io/message/118692#118692

Has this been discussed before? Some use-cases:



use array as tuple;  // Could interact with Psalm/Phpstan to give more intentionality

use array as strings; // Same, together with "@param string[]" docblock

use int as meter;  // To communicate intent

etc



Hard-coded support in the parser could perhaps be added here? https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L469



Olle Härstedt



Software Developer (Chief Software Architect)



tel:+49 40 22660066



mailto:olle.hearstedt@limesurvey.org



https://www.limesurvey.org





LimeSurvey GmbH



Papenreye 63



22453 Hamburg



Sitz der Gesellschaft / trade register: Hamburg, Amtsgericht Hamburg HRB 137625
 Steuernummer / tax id: 49 / 740 / 01441


https://www.limesurvey.org











https://www.facebook.com/LimeSurvey/


https://twitter.com/LimeSurvey


https://www.linkedin.com/company/limesurvey


https://www.xing.com/companies/limesurveygmbh


https://github.com/LimeSurvey/LimeSurvey
