Issue: https://github.com/php/php-src/issues/9529
Author: Yurunsoft
### Description
The following code:
```php
<?php
declare(strict_types=1);
try
{
$pdo = new PDO('mysql:host=127.0.0.1', 'root', 'root');
$pdo->query('select x');
}
catch (\Throwable $e)
{
var_dump($e->getCode());
}
```
Resulted in this output:
```
string(5) "42S22"
```
But I expected this output instead:
-
---
Is it possible to change the return value of Throwable::getCode() to
int|string?
https://github.com/php/php-src/blob/eb22f1a31ad02699c718fe15ce648acd401900e4/Zend/zend_exceptions.stub.php#L12
### PHP Version
8.0.21
### Operating System
Ubuntu 20.04