Re: Re: Improving PHP's type system
| From: | Johannes Schlüter | Date: | Tue, 19 Apr 2016 23:34:35 +0000 |
| Subject: | Re: Re: Improving PHP's type system | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-92511@lists.php.net to get a copy of this message | ||
On Wed, 2016-04-20 at 00:09 +0200, Marco Pivetta wrote:
> In Doctrine ORM, having a way to know that a field or parameter is a
>
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
string | null or a int | float
> may be the difference between
> knowing
> what kind of column definition is needed for a field at DB level,
> without
> even need for defining manual mappings.
So what's the column definition if you see string | null? A PHP string
can have (almost) arbitrary length and binary data, so this is a BLOB?
Most likely not what the user wants.
The PHP type hardly describes the constraints by the application. This
might add a small sanity check but by no means a game changer.
johannes
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc