[php-src] Issue #11196: Variable Type Hinting
| From: | poorbash | Date: | Sat, 06 May 2023 12:26:26 +0000 |
| Subject: | [php-src] Issue #11196: Variable Type Hinting | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244388@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11196
Author: poorbash
### Description
Hello, I am a beginner in PHP. I want to see why PHP does not support Type Hinting in variables?!
I want to be able to do this:
```php
<?php
int $age = 15;
string $name = 'Pooria';
//...
```
But it is not possible. Why? Please add this feature. It is really necessary and important. Thank
you.