Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71525 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59032 invoked from network); 24 Jan 2014 20:14:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2014 20:14:12 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.216.182 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.216.182 mail-qc0-f182.google.com Received: from [209.85.216.182] ([209.85.216.182:38151] helo=mail-qc0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/77-21270-299C2E25 for ; Fri, 24 Jan 2014 15:14:11 -0500 Received: by mail-qc0-f182.google.com with SMTP id c9so5043236qcz.13 for ; Fri, 24 Jan 2014 12:14:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=5Drt+UnUj+7MhvMBHxURrl/R8zwI3EnNZz0vnFoGElg=; b=lrscdMOdP7n/s6mlACE3CJnZ3Ok2U63mXEoAQNe+++iMvQwQ+JhdqQW5aHOX5vteQ8 WArA1sbKnQO+gbBcVyp/yd7DoSosROuJKSmnj/LbnQT3reZNxySsJlZ7vCfqQNvUCr8f +X8bZ63EA76tGL0cDXwwfMRSKf2ptZWUPmDSznh8/iZP8V+9VZLr+BiRGIFillIBSAAE qcpniN8clMH9KkbAhZf8WZuDOMLRCBvaKmLCIRjx6kpFpLJV44gLQgSDGhL7wGO4At8E cKTO/acmPZecA9N76ostXpiCBEbPXwyQ/NhBAQ6GmCNBrAo56F2vl2lRCc3ZTanhfBbp b9Og== X-Gm-Message-State: ALoCoQmVrUNvWTwMPCA/1BMRGTgXGvlsF64Yf1DTKT30/gIQ9OYqHkromY+8r3NN8dL0y1j12RVs X-Received: by 10.224.2.194 with SMTP id 2mr23629266qak.44.1390594448429; Fri, 24 Jan 2014 12:14:08 -0800 (PST) Received: from [192.168.200.30] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPSA id f5sm4316720qas.11.2014.01.24.12.14.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Jan 2014 12:14:07 -0800 (PST) Message-ID: <52E2C98C.6010005@lerdorf.com> Date: Fri, 24 Jan 2014 12:14:04 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: PHP Internals References: <52E29253.2000801@lsces.co.uk> <52E2924B.6080002@ajf.me> <52E299D4.6040102@garfieldtech.com> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tTMLaDhsWUEPnSXd6Hda0S6Td04HPAC1P" Subject: Re: [PHP-DEV] Ruminations on PHP 5++ From: rasmus@lerdorf.com (Rasmus Lerdorf) --tTMLaDhsWUEPnSXd6Hda0S6Td04HPAC1P Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable PHP is and should remain: 1) a pragmatic web-focused language 2) a loosely typed language 3) a language which caters to the skill-levels and platforms of a wide range of users The web is not typed. If we are going to expand the type checking we have to respect type coercion. If people can no longer do: age_check($_POST['age']) because age_check is defined as: function age_check(int $age) { } then we have a problem. This is why PHP doesn't have type checks for coercible types, of course. Many suggestions I have seen so far use the friendly-sounding "type hint" term to introduce strict typing. They aren't hints at all in those implementations. It doesn't mean we can't do something here, but it has to be done very carefully. And rather than piling on language features with the main justification being that other languages have them, I would love to see more focus on practical solutions to real problems. The password_hash() addition in 5.5 is a good example of addressing a real Web problem. PDO could use some attention. For example, I've been looking at PDO-mysqlnd and mysqli-mysqlnd and trying to get them to share the underlying mysqlnd connection. Why? Because PDO has a very nice client-side prepare implementation which saves 2 network roundtrips per query over doing them server-side. But, at the same time mysqli has some very nice low-level features people would love to have access to. Being able to export the underlying PDO connection to the native API across all the drivers would be a significant improvement. Performance is always interesting. There are plenty of places where we can get some performance wins, especially through tighter integration with opcache. Unicode Unicode Unicode. And yes, I know these are much harder and less sexy than adding a couple of tokens to the yacc grammar, but when we start looking at a new major release this is what I hear from people who are running PHP in production environments are looking for. Language features are nice, if they are well thought out, but significant infrastructure improvements are nicer. -Rasmus --tTMLaDhsWUEPnSXd6Hda0S6Td04HPAC1P Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org iEYEARECAAYFAlLiyY0ACgkQlxayKTuqOuAuTgCdEjrfH9UtFyoVSSSqvxvfLJxw t6wAniOW5a7H3Or401G+9a3rzKxiKsY1 =TZVW -----END PGP SIGNATURE----- --tTMLaDhsWUEPnSXd6Hda0S6Td04HPAC1P--