Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118049 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 25130 invoked from network); 22 Jun 2022 12:57:14 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Jun 2022 12:57:14 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 95980180546 for ; Wed, 22 Jun 2022 07:46:45 -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=0.6 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,MISSING_HEADERS,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-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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:46:42 -0700 (PDT) Received: by mail-ej1-f48.google.com with SMTP id lw20so12418462ejb.4 for ; Wed, 22 Jun 2022 07:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=XDEhEtQeGZivozREv4M24vQ06l7iI/YujrGe8qRG3TM=; b=CzXYjQwinxUtW+gsKmfx9CvoIhfaEG6Ybr5DJmLICpNYLa4IpzmscTrUD29ADeO4R8 g0teDkw6cYGzK1cF5XrLKpUuelISVQmUyB+Slh1m9oXvjDioaAafd6pOjBbM3E1uAheY ClMwQVdWneuE8QgdT1XJ7Jl3SPUo3J8imnrG92Ea7/eMO1EVjbk1Wltd0p/sZYI/a8Jv NQNHxw22HzhJ4WSeaNuBYNKFn+1INGr2DQIFcoJbGnAcgzHd5fGI+H5i4kmt4lR2Quoz vat/DVIb7/qaiNjLtKTqLkFyMy+0U9oNILjHuGCGMZjplU5/AG2aMI7ABzpT5gA+uepQ Spnw== 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:cc; bh=XDEhEtQeGZivozREv4M24vQ06l7iI/YujrGe8qRG3TM=; b=6TDpbHBUEpzTW+4cMgh4T0gHFYGaw2G0J/LSloITIdgNKBXPKGEDsAL98EDG5ra98w LLdozywff22Jf65cf8POho8zm+k5j11sMqWRBqG7XLmNaV9q2A+sZ69SGimAVRvTyDik dXX1CH/MHKQmFI64jdSY/LPyFVS7J/trU9H7jffiHREK3VKmp561jjluO7vmlDyxp2Fc NhaD/u8fe84mZzkSPSjaD9AQOEV35pd5vZM1SmECrEBKaalqUqcJlglXl1V7VhgpBukG Ujt/Gu7V55LXaAs0KDqAX+c6DqwLGzLfdgYXNJreWs1/s52Db8958ZQs6LNPpSXLGCnO ym7Q== X-Gm-Message-State: AJIora/eOR7ldvIzL9oqO/rHdj72D7te1gPOL/GtD1h4IJ8LJALPR8cE pyvLSypf7pHpXySH43V+1Jx5u36oZd+W2U8b7pIwglHqedcWJg== X-Google-Smtp-Source: AGRyM1taxW7FXzdoUBxrIt3j03ijFqn1Oldzjtji0ThKfoeoeL38CNrEHRFVAysrQkDXOz31oaDtYI2Zq0FSQeNV9TY= X-Received: by 2002:a17:906:7791:b0:712:1c42:777a with SMTP id s17-20020a170906779100b007121c42777amr3510954ejm.68.1655909200341; Wed, 22 Jun 2022 07:46:40 -0700 (PDT) MIME-Version: 1.0 References: <7CB0EB0B-700D-49F6-8223-00A9B16F463B@php.net> In-Reply-To: Date: Wed, 22 Jun 2022 16:46:04 +0200 Message-ID: Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000aab29005e20a67a8" Subject: Re: [PHP-DEV] [RFC] [Under Discussion] New Curl URL API From: divinity76@gmail.com (Hans Henrik Bergan) --000000000000aab29005e20a67a8 Content-Type: text/plain; charset="UTF-8" any particular reason CurlUrl::getPort() defaults to 0 rather than one of the valid options? (that being CurlUrl::DEFAULT_PORT and CurlUrl::NO_DEFAULT_PORT ) On Wed, 22 Jun 2022 at 16:23, Pierrick Charron wrote: > 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 > --000000000000aab29005e20a67a8--