Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71532 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70274 invoked from network); 24 Jan 2014 21:03:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2014 21:03:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.43 as permitted sender) X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 209.85.216.43 mail-qa0-f43.google.com Received: from [209.85.216.43] ([209.85.216.43:52006] helo=mail-qa0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/D9-21270-125D2E25 for ; Fri, 24 Jan 2014 16:03:30 -0500 Received: by mail-qa0-f43.google.com with SMTP id o15so4504927qap.16 for ; Fri, 24 Jan 2014 13:03:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=ieLjtc29Ow2Q5lz3wYr5IGjdJbhawijl+SX/E1Ji2CY=; b=QqZp78HrhnRBmxlzzd3/drOBi6HlaXRr5uUGymdjWEWVHzvNsbeh4yzOFRFirJ2hWj kA+DIsOM+3+rbgGBrGhf/omtbESSV7sT7ZdRfqK33u9SW7LaYHRm7LGsGyIXftEKOy1m ReeWLE/NVtKXAia1MUquj0o63FW39I7BKxLUzg0ZhGIh1gpN1RySUC4yO9LaXX+mbzzT bBk/kaOi7NN1gLrXWaR1ghZBwiUegrlimVO2J0x8Ss1Wple6wu7VjhVaa5n62W1d6kFj KViuu5kMqJ45fDufi+YS+/IwJ46ZZb3CXh1xuUnvmuX7oUAjcYjeiRVAfaQ/JTYXdI+o Rn0Q== X-Received: by 10.140.89.52 with SMTP id u49mr22567287qgd.93.1390597406805; Fri, 24 Jan 2014 13:03:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.97.182 with HTTP; Fri, 24 Jan 2014 13:03:05 -0800 (PST) In-Reply-To: <52E2C98C.6010005@lerdorf.com> References: <52E29253.2000801@lsces.co.uk> <52E2924B.6080002@ajf.me> <52E299D4.6040102@garfieldtech.com> <52E2C98C.6010005@lerdorf.com> Date: Fri, 24 Jan 2014 23:03:05 +0200 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=001a11c1236a7571bb04f0bdb05f Subject: Re: [PHP-DEV] Ruminations on PHP 5++ From: arvids.godjuks@gmail.com (Arvids Godjuks) --001a11c1236a7571bb04f0bdb05f Content-Type: text/plain; charset=UTF-8 2014/1/24 Rasmus Lerdorf > 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. > I've wrote a lot on that subject when the floodgates were open on the internals. I think under type-hinting most of the people understood the convertable type of hints, when a string is automatically converted to a number (float or int depending on the defined typehint) and I still support that idea. I strongly belive that those who are advocating to strict type hints have to be banned from the list (joke!), but seriosly - as you said, there can not be any kind of strict type hinting in PHP and I belive this has to be declared somewhere on php.net in writing as an axiom. > > 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. > The PDO. This is something that needs so much improvement that it's ridicilous it has survived till this time. I use Yii framework as my tool, they use PDO as their base. I have considered many times to integrate a mysqli to PDO wrapper to bring things like mysqli_ping, unbuffered queries and lost more. At this point I can do without those things because I do not have a lot of load on my projects, but they are growing and at some point abandoning the PDO will be a nesesity due to it's lack of features. I think PDO is a bad idea for PHP as a whole. We are better of with a consisten API through the native drivers and maybe a PDO like thing that gives us data objects, but still provides ability to get to the low level stuff that is sometimes needed. PHP lately has moved to projects that previosly where done on Java and some other move advanced tech. And lack of frameworks using the native drivers is kind'a bad, because in really advanced projects you have to create your own framewok... > > 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 > > Agree. Although I'm unable to help directly (my C is confined to some basic Borlan C/C++ in DOS), I agree with your view absolutely. --001a11c1236a7571bb04f0bdb05f--