Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91787 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98011 invoked from network); 20 Mar 2016 13:59:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2016 13:59:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 212.232.25.162 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 212.232.25.162 mx206.easyname.com Received: from [212.232.25.162] ([212.232.25.162:39550] helo=mx206.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/05-48999-5CCAEE65 for ; Sun, 20 Mar 2016 08:59:34 -0500 Received: from cable-81-173-135-2.netcologne.de ([81.173.135.2] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ahdtC-0003SL-Ty for internals@lists.php.net; Sun, 20 Mar 2016 13:59:31 +0000 Reply-To: internals@lists.php.net References: <56E9C241.1090905@fleshgrinder.com> <3B.AA.03097.757BDE65@pb1.pair.com> <56EEA379.20503@fleshgrinder.com> To: internals@lists.php.net Message-ID: <56EEACBA.8040506@fleshgrinder.com> Date: Sun, 20 Mar 2016 14:59:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <56EEA379.20503@fleshgrinder.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eKPMRFBXgPEriTQNhB5QtKKwdU0mN7OAL" X-ACL-Warn: X-DNSBL-BARRACUDACENTRAL Subject: Re: [PHP-DEV] [RFC Discussion] Typed Properties From: php@fleshgrinder.com (Fleshgrinder) --eKPMRFBXgPEriTQNhB5QtKKwdU0mN7OAL Content-Type: multipart/mixed; boundary="TxX2cdT653gWKkTAmeoHaBkO8TLuwAf1m" From: Fleshgrinder Reply-To: internals@lists.php.net To: internals@lists.php.net Message-ID: <56EEACBA.8040506@fleshgrinder.com> Subject: Re: [PHP-DEV] [RFC Discussion] Typed Properties References: <56E9C241.1090905@fleshgrinder.com> <3B.AA.03097.757BDE65@pb1.pair.com> <56EEA379.20503@fleshgrinder.com> In-Reply-To: <56EEA379.20503@fleshgrinder.com> --TxX2cdT653gWKkTAmeoHaBkO8TLuwAf1m Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 3/20/2016 2:19 PM, Fleshgrinder wrote: > On 3/19/2016 9:32 PM, Andrea Faulds wrote: >> This adds a loophole to property type checks which, as previously >> mentioned, prevents us from performing optimisations. I also don't see= >> why internal functions should be treated specially here, given that >> surely one could write userland code with the same needs as MySQLi? It= >> doesn't seem intuitive. >> >=20 > It is just code that exists and is used and I am trying to find a > solution for it together with this new feature. I already wrote that I > would highly prefer that *mysqli_result::fetch_object* and > *PDOStatement::fetchObject* work differently but I am not the maintaine= r > and I cannot tell if they are willing to change their behavior. >=20 > The auto-mapping these methods provide is in general an extremely nice > thing to have. Plus it is much faster than a comparable userland > solution; which is of course implementable. >=20 Just wanted to add that this is only true for a userland implementation that does the same as these two methods do because such an implementation would require reflection. Creating a *O::fromArray* as it is best practice and feeding it with a dictionary is faster and much less magic. --=20 Richard "Fleshgrinder" Fussenegger --TxX2cdT653gWKkTAmeoHaBkO8TLuwAf1m-- --eKPMRFBXgPEriTQNhB5QtKKwdU0mN7OAL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJW7qy/AAoJEOKkKcqFPVVrzlEP/3wW9EGFKyqtnqnRFATksSYg qNh+noUPUHT1sOfbxj99Z5ccj4v+mIoKvdFy026XPWYud26LY4ibRlMGLOu+MF12 iixSXa9lqT99IDjhyxWlhIoeKIMRuHju+JpGsra8fkhwG1/kpyJ8lTNhDyfvkGq/ E9bKa112TDh9zFhtkPjC00zJ6Fj8WhxBGhSqQsw42+Ar6qROWv3+lWXcEOCVfzDU ErjHjf8mLb5GE8z88sU/YCKFTtp5/6a24KYgGRd68V5NMwr7nu0sB4LVlnJF5W9f GCE8lhPP59CNjKF9EZVXbF3oaa41f605dp/Ub4oDtVtQjH8xtJnlyShpX2+u14t3 /3lmsdCwC1DKwrGdbVlth00j6lGcTnYhH3fj/9Bypi9UfeovJqjLLFsaQMrzHHIl p/nRyZVQ1LjJIN36iyGAOu854UFJcSLErW+tH5h4MhwNz5XtT1rfdTApH/zlqKWf KP8az8qhQ/oLZaZSmfXfpeSDcZXhE3elNyELOAyXSm4bCJhRMlOdrb9Ew4xCsOTJ OqzcAHi7hNU0G/KOtbQ+EIrtGlF/L1Y+ChjIgNo3dGk9glOGB1YYMClEdmsB3puH BSXy77bcvMxaS+yIeD2y+w8u70lCORR/+MLz5KLDZCgVY9+oDOt0kXKEn9vBmqP9 TifKDgyoRGG+qtSZeGSf =rMPG -----END PGP SIGNATURE----- --eKPMRFBXgPEriTQNhB5QtKKwdU0mN7OAL--