Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118047 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21530 invoked from network); 22 Jun 2022 12:34:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Jun 2022 12:34:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D1092180538 for ; Wed, 22 Jun 2022 07:23:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_50, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 22 Jun 2022 07:23:49 -0700 (PDT) Received: by mail-lf1-f53.google.com with SMTP id t25so28048706lfg.7 for ; Wed, 22 Jun 2022 07:23:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yAiAJoXYJ1RN9nvxcS16kq2UlrutJUCB6sfAK0W2f08=; b=3T9rrtieHUaNnrAxLqp1ZgtMtfoX90R3vy85EcwDo24ozrueoBbQ2b9Gbc8Doltb8M 33ppeUyD0bXpXnGsP1zSO8JyX/+Twe51RoZmBlmQlPVQC8r1DXOWbrpCV7x9p2ULFrZg ebKnY8DWV0bH64vNg5qHgTtinFQ63TIDbAZLV/5AFnzcroylDkAlKQ/rPXrDJJMImG3L UFPWcvK3nw/SKS+nW5MmjkZX7JLK2IAJ6PaLP3PkngmDDRfqKl8RG1tSFpAJo8x5A69S YYtLMnj5j+ImNiWiMAuFZIeGWmmqLkeQGO1lTNPDR7BVo2B8gpuiMj8xYQLm6kvV1SZO TYXQ== X-Gm-Message-State: AJIora8v1KqDR8VIBJRsFGp3GYR7f5tFEqjRQqE/ulJOthI8OSFZGWMr 57TNyjLf8mHUsC1YcuJ0v5V7VOWWcidHic9C+DqM+4Ha8BgM2g== X-Google-Smtp-Source: AGRyM1uNyEkD+Ye5/uCY+mnLaeVOiumzHqIXTvah8Sejt3gPkL/pX5bAJBsPD2S/UEHws/dCjiegHo2mupU5gbD4brw= X-Received: by 2002:a05:6512:3e09:b0:478:f180:2264 with SMTP id i9-20020a0565123e0900b00478f1802264mr2321543lfv.448.1655907827699; Wed, 22 Jun 2022 07:23:47 -0700 (PDT) MIME-Version: 1.0 References: <7CB0EB0B-700D-49F6-8223-00A9B16F463B@php.net> In-Reply-To: <7CB0EB0B-700D-49F6-8223-00A9B16F463B@php.net> Date: Wed, 22 Jun 2022 10:23:36 -0400 Message-ID: To: Derick Rethans Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000d9e8ac05e20a1513" Subject: Re: [PHP-DEV] [RFC] [Under Discussion] New Curl URL API From: pierrick@php.net (Pierrick Charron) --000000000000d9e8ac05e20a1513 Content-Type: text/plain; charset="UTF-8" Hi Derick, > > - The new CurlUrl class should probably be immutable from the start. It > was my biggest mistake not to do that with DateTime. > > Thanks for sharing your lessons learned. But I still see some use cases where mutable objects are easier to use. From the experience you had with DateTime, do you think that having `CurlUrl` being immutable and providing a `MutableCurlUrl` would make sense ? I see some cases where you "navigate" on a website using the same CurlHandle and just want to manipulate the MutableCurlUrl handle to change urls. > - What happens if the curl library available on the system does not have > the features and functions that this new class relies on? I would expect > the class to not be available either, but the RFC does not mention that. > Good point. As you expected, if the functions are not available in libcurl, the class will not be available. Same thing for each constant/feature. The extension will "adapt" to the curl version. I will add this to the RFC. Pierrick --000000000000d9e8ac05e20a1513--