Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92511 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64118 invoked from network); 19 Apr 2016 23:34:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Apr 2016 23:34:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:45751] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/9E-22821-490C6175 for ; Tue, 19 Apr 2016 19:34:45 -0400 Received: by mail.experimentalworks.net (Postfix, from userid 1003) id 4A1DE4766A; Wed, 20 Apr 2016 01:34:42 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on km31408.keymachine.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=4.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.0 X-Spam-HAM-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP Received: from [192.168.2.34] (ppp-46-244-188-236.dynamic.mnet-online.de [46.244.188.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id 2F0E747668; Wed, 20 Apr 2016 01:34:39 +0200 (CEST) Message-ID: <1461108875.2175.5.camel@kuechenschabe> To: Marco Pivetta Cc: Zeev Suraski , Levi Morrison , "internals@lists.php.net" Date: Wed, 20 Apr 2016 01:34:35 +0200 In-Reply-To: References: <570E99AC.3090804@fleshgrinder.com> <570EA5EB.8090501@fleshgrinder.com> <570EAB0D.6080706@gmail.com> <570EB67E.8010908@garfieldtech.com> <5B147E88-CC0A-4CBC-A49D-C7FE3BF557C0@zend.com> <6F.C3.12455.94C5F075@pb1.pair.com> <20160414094440.GF19347@phcomp.co.uk> <570FD94F.90703@fleshgrinder.com> <570FE8A9.4020809@gmail.com> <20.53.29891.17401175@pb1.pair.com> <57110BCD.5030009@garfieldtech.com> <571124C2.9040606@gmx.de> <57112F31.8070209@garfieldtech.com> <57167C35.8080601@gmail.com> <57168FCC.7000507@garfieldtech.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-0U6AG3eJOFQlJ6cbhObl" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Subject: Re: [PHP-DEV] Re: Improving PHP's type system From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) --=-0U6AG3eJOFQlJ6cbhObl Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 > `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.=20 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 --=-0U6AG3eJOFQlJ6cbhObl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAABAgAGBQJXFsCMAAoJEH3sTmn8nIPXbeEIAOF3AGqSddTxPxPNbnYLj7Oe Sn5zYfK05kDhNz2DgYsk6nlLHBZud7LidPQ9rqvKSIoxuFBsF+DLVIwq48d0FhTb jNNrJIBlrtqJCuJiqqeJ+UUO0IDoXljv4oS3I8KZrUdLYE1gcwUlkzITYUff7HYV 104Yj7nSsE6J79akAsImw82jeZfLqG2aigavH92PcUuDnllUDm9eQpV3wvyWTeRU tjDoRz1rD6drIkaJ5NRsoLzWLfCFy66a/dQREWJp6oKk4jAHQgycpmlEohrpP9tH ytgI6dM2Co+7DYxg9UtNHlLeK7nWxdw5OSMpi+Vwm8xGoOCGBqnFMfCSuuicGWo= =MUwx -----END PGP SIGNATURE----- --=-0U6AG3eJOFQlJ6cbhObl--