Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67212 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4506 invoked from network); 30 Apr 2013 11:48:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2013 11:48:59 -0000 Authentication-Results: pb1.pair.com header.from=alex@kazik.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=alex@kazik.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain kazik.de designates 209.85.192.180 as permitted sender) X-PHP-List-Original-Sender: alex@kazik.de X-Host-Fingerprint: 209.85.192.180 mail-pd0-f180.google.com Received: from [209.85.192.180] ([209.85.192.180:64918] helo=mail-pd0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/B2-18873-AAFAF715 for ; Tue, 30 Apr 2013 07:48:59 -0400 Received: by mail-pd0-f180.google.com with SMTP id u10so261140pdi.11 for ; Tue, 30 Apr 2013 04:48:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kazik.de; s=google; h=x-received:mime-version:sender:x-originating-ip:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=xXzCMO/C7LQjwLpteWNMObmMiS01OmRH6qMC4zvrm+Y=; b=jqjzo0Iwhf9VIaRgEJ3ng4UkVcZVUmiv63Z/RK5yPzfPLhWLwDe2DjnGqvoul7M7FK cmnlwspMenFomf9QVj5EDMQih3l+Cv8AubKXH4NST0wKAkUAJ0g4dhYatXC95aE2n6LY GNHYK1+Gnmx2dXOwSKtnB7HA3nwL16nswl5Bc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:x-originating-ip:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:x-gm-message-state; bh=xXzCMO/C7LQjwLpteWNMObmMiS01OmRH6qMC4zvrm+Y=; b=NPHMC99kH+UQtKdxAwnHzuZH+Xvs5VnMg6DGBh8fDXs0z8DPYjAOs+MbPI+LEDj0hl Foda0vQBDx/Vmhmg2KIajCu07suQHuGf2x+xcIQ0Gv1bOD/k2JhKhHvz3DGPzOyKKqgf jqFbv8tF5Bie+Mp49q39ny7ogNTgOLz9eN/AiLfQzaOVF2gZhaXRBTHcooq+/zfUqmNz muzMDgRginC5LRHMMlvhu3bM4sAsOQ55wtECctqkA3EPk8TAdRscv3fsjbass0pXDxZl P9Cu3rWutnJ5FrUtp5/3WrnKQa59PMziU2ZtmBaHjwRMAdX0YH3nZ617yxANkR/Tlaba 78gg== X-Received: by 10.68.180.4 with SMTP id dk4mr75677506pbc.104.1367322536172; Tue, 30 Apr 2013 04:48:56 -0700 (PDT) MIME-Version: 1.0 Sender: alex@kazik.de Received: by 10.68.16.9 with HTTP; Tue, 30 Apr 2013 04:48:36 -0700 (PDT) X-Originating-IP: [212.8.208.194] In-Reply-To: References: Date: Tue, 30 Apr 2013 13:48:36 +0200 X-Google-Sender-Auth: ZOIU1FSIlOjKVbelvuCCA28OHPM Message-ID: To: Anthony Ferrara Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkywXi5jAh69YkikbUdpgd9HHAD6ti/96amcGxRBV+KWr9SyakGiv2joVRFIaUyabfewwCs Subject: Re: [lists.php] Re: [PHP-DEV] Re: [lists.php] [PHP-DEV] [PROPOSAL]Add second to callback of preg_replace_callback From: lists.php@tx0.eu (ALeX) > There are some weird questions that come up with that. For example, if an > array item is an object that implements both __invoke() and __toString(), > which should be fired? Is it a string? Or a callback? What if I pass a > literal string "strlen", is that a callback, or a replacement? You're right that was not fully thought trough - I shouldn't post in the middle of the night ;-) What about a new modifier (example "c") which then uses the replacement as a callback.