Re: Reference from str_ireplace to str_replace

From: Date: Fri, 15 Aug 2014 15:55:50 +0000
Subject: Re: Reference from str_ireplace to str_replace
References: 1 2 3 4 5 6  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969385111@lists.php.net to get a copy of this message
2014-08-15 17:37, Peter Cowburn worte:
On 15 August 2014 15:59, Maciej Sobaczewski <sobak@php.net <mailto:sobak@php.net>> wrote:
        On 15 August 2014 14:05, Maciej Sobaczewski <sobak@php.net
        <mailto:sobak@php.net>
        <mailto:sobak@php.net <mailto:sobak@php.net>>> wrote:
             Accidentally sent this off-list :/ With few days of a delay
        but here
             it is.
             2014-08-13 09:54, Christian Stoller wrote:
                 From: Maciej Sobaczewski [mailto:sobak@php.net
        <mailto:sobak@php.net>
                 <mailto:sobak@php.net <mailto:sobak@php.net>>]
                 Sent: Tuesday, August 12, 2014 2:58 PM
                     Hello,
                     Firstly, sorry for unclear subject. I don't know how to
                     write it shortly
                     and clear, due to my limited English skills.
                     I'm wondering if this wouldn't be better solution
        to link from
                     str_ireplace() to str_replace() and delete
        duplicated content.
                     Basically, the approach as in require and include pair.
                     What do you think?
                     Regards,
                     Maciej.
                 I think this would make the doku less readable, because
        you will
                 have to list the different function definitions.
                 Christian
             Hello Christian,
             I probably made it unclear. I do not want to merge those
        pages. I'm
             proposing to leave str_ireplace() but remove duplicated
        content. So,
             basically, leave function signature on str_ireplace() and leave
             description saying that user can use it instead of
        preg_replace()
             with i modifier and that further documentation is available on
             str_replace() page.
             As far as I can see rest of information is the same on both
        pages so
             I think that it makes no sense to keep it duplicated and
        maintain
             two places instead of one.
        I would rather have (keep) full documentation for each of the two
        functions.  Common pieces should be moved out to entities, to be
        included in both pages… that’s what the entities files are there
        for!
             Maciej.
    However, for some reason, we decided not to put include/require
    content in entities but just link between pages.
    Our users are still alive and we have less content to maintain. Just
    saying ;) It's not very important to me, I rather posted this as a
    proposal to make our life easier users expierience more consistent.
If anything, it is the require/include pages that should be changed if you’re aiming for consistency. They’re the oddballs that are handled differently than everything else; which is okay with me anyway since they’re under “Control Structures”. As for making our lives easier, I’ll repeat, that is why we have entities. Their whole purpose is to be written in one place and used in multiple places.
    Regards,
    Maciej.
Okay, I think I've got your point. I don't really like *such* big spinnets in language-spinnets.xml, this file is hard to maintain in translations, but I agree that it is proper place for such things. Thanks, Maciej.

« previous php.doc (#969385111) next »