Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60172 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25976 invoked from network); 18 Apr 2012 08:53:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2012 08:53:09 -0000 Authentication-Results: pb1.pair.com header.from=philip@roshambo.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=philip@roshambo.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain roshambo.org from 209.85.210.45 cause and error) X-PHP-List-Original-Sender: philip@roshambo.org X-Host-Fingerprint: 209.85.210.45 mail-pz0-f45.google.com Received: from [209.85.210.45] ([209.85.210.45:53930] helo=mail-pz0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/24-03614-3F08E8F4 for ; Wed, 18 Apr 2012 04:53:08 -0400 Received: by dacx6 with SMTP id x6so9437711dac.18 for ; Wed, 18 Apr 2012 01:53:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=/PrcAmpRXnXiSlYoD1qsxszllT2PsIYfaSxTIEjkOIg=; b=jySgYy6GeXWKT0l+0ud27wYkVPjUplT1b13NEFN4bichwSY0fRf6FLJfflgn0YlBvp mUZkQygzehEuEp3h3xQftnpyu7AlW7bUos93PG1yPq8jQO940z7N+IGPje6p/JYGNH7f E+xIrM+N50ze9i+oZAEBIOMYepGQXiYbPtSRn0z/eueXiKlUOmok5diGCxiavGSZM4J8 MW2G/mFUjp2SChP1K0Q7+oMRFzFmG6Ace+1Y5CoNW3ehZ6mrGY510a7v666sS3bs+/eM rO+iG0fle9KMR2orE3odOOAEhxaGIQOTsWV/mSQ2gBsSrsLgA+qKMS9Ibm/zBg9nChbM sBXA== Received: by 10.68.226.168 with SMTP id rt8mr4727294pbc.103.1334739184469; Wed, 18 Apr 2012 01:53:04 -0700 (PDT) Received: from [192.168.2.100] (c-71-56-134-232.hsd1.wa.comcast.net. [71.56.134.232]) by mx.google.com with ESMTPS id vh6sm2998563pbc.25.2012.04.18.01.53.02 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Apr 2012 01:53:02 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=windows-1252 In-Reply-To: <4F8E7CA0.9070400@php.net> Date: Wed, 18 Apr 2012 01:53:01 -0700 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: References: <4F8E7CA0.9070400@php.net> To: Hartmut Holzgraefe X-Mailer: Apple Mail (2.1257) X-Gm-Message-State: ALoCoQnLKLcrMijCBIOryHn3JzTB8mobtz4+F9G4YTYIz86ilBO63IsI1ywHz6qiC98VX3GPa7cp Subject: Re: [PHP-DEV] [off] PHP: a fractal of bad design From: philip@roshambo.org (Philip Olson) On Apr 18, 2012, at 1:34 AM, Hartmut Holzgraefe wrote: > On 04/10/2012 06:20 PM, Adir Kuhn wrote: >> Hi folks, >>=20 >> today I read this post, I think that some points are valid, follow = the link for >> you guys >=20 > as stuff like this comes up again and again (although not in as epic > lenght as this one) i've been thinking whether it might make sense to > have some >=20 > "PHP Gotchas, how they came to be, and why we can't simply fix them" >=20 > FAQ section in the manual or wiki? >=20 > If nothing else it would at least help with dealing with this kind > of rant (nothing new here, move along, your concerns were already > covered in ### in great detail), but also might help that would > indeed want to understand why some things are as they are. >=20 > I'd rather proactively own this kind of discussions than just > jump into them whenever they arise elsewhere =85 Hello Hartmut, Agreed, and I think it belongs in the manual. An example (not being proposed as such, but is a rough idea): Why are function naming schemes seemingly random? PHP glues many different API's together, and sometimes this gets messy. PHP leans towards the C variant which is why the likes of strlen() vs str_replace() exists, and =85 As opposed to our current approach, which is via mailing lists and=20 typically "RTFM." or "BC. Read archives." or the like. Ack! And also include possible solutions/recommendations like this PHP FAQ entry about haystack,needle ordering, which includes the following=20 text: A simple rule of thumb is as follows: Array function parameters=20 are ordered as "needle, haystack" whereas String functions are the=20= opposite, so "haystack, needle". And thankfully there are already a lot of sites to steal the questions=20= from, and often answers live within their user comments. :) Regards, Philip