Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124029 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 579AC1A009C for <internals@lists.php.net>; Sat, 29 Jun 2024 11:52:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719662040; bh=vHPZYbsOuvCmPFMMEHCyKIW6SJ6dQAM1+AKXnhHnlhI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=fi/4OQ0hpThJZGRPB7SE0Yt/5p+ZAd2U2K+6R28IdvF7Gp6IBwEekSy5STVj8F+Pk JlM35qO7jGJAUsFd3FCYYy6ZOchY9rD34Mvis1JWOHhwzf6EsNxBr1cq0vf73VA14/ 4hsmxOKb3/B+6rvfPJfkmb3/GPD5qxXw8zqpOIoKM3O1OGMNvqYXp6npGhoEbJSiPr BHwXWvP47085QYMt7ijscFuKuXfJ8pwebIHuaqhaKSc5SORzpx84P+CQbSoGqJBIgZ yuduHf55FZyOO9cfqQ1oz3DWPlFvflLNdeVc3t98sq3l84UFSgg8fWw6pQDfvuxJmm iuc9PZFxiEX4A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 59CBC180661 for <internals@lists.php.net>; Sat, 29 Jun 2024 11:53:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,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=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: <bilge@scriptfusion.com> Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for <internals@lists.php.net>; Sat, 29 Jun 2024 11:53:58 +0000 (UTC) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-424ad289912so10796655e9.2 for <internals@lists.php.net>; Sat, 29 Jun 2024 04:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scriptfusion-com.20230601.gappssmtp.com; s=20230601; t=1719661958; x=1720266758; darn=lists.php.net; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=wLq775qjjP+q4PBldg9nch7tOE+uSgq6VmILMP9epNg=; b=Gwt/r4lvEX9a97nVDthqQipt6MMzD/uAOHRRCFtJUDtjvjV5e1aSfmRqTvyzpjAgIE T+dqZwoQxRUDB1CG35gwoXScYK+5SeIUe3b4xX/ijMRpV0CYmpxas3RXtNxYFy2uGD1P Jo0ZkmEjStIUvhSrqtHqjqUCELcJXay6HrUqGur7pRRx+jvvU0wUdlOhIU6kJod0vsqq n5SQBLdNjBbFzt3kb8IFvuG6VlW1iiVejFaGNqlrsfKyc26JVul9zdJi3KAz7Qcbmi6z HkahRyQw85LTZoV9z4erZLDFEu9doweKA8/+yic4zk//a0UHhBA83Wg+8VKgy1iBujYj oTIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719661958; x=1720266758; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=wLq775qjjP+q4PBldg9nch7tOE+uSgq6VmILMP9epNg=; b=iEV09dPST7qwfmvOEiZCUO947j0Urya7r/fEQiha7jy3BpUZxrUSnPDvnY0P/e8R4w Zfvt2xy08CcNK5Omgfbvex/AJhuSvxwYBjpuJvNPUqoaLiEO+vj8NdVslWA2eYrMau3u 0W5uAE50lef1R4r+tzTcE9X9xmNoFLQ1xjtcI52Uu3SPoIGPFAoCGh2km/aqTqzMGpES UKgmTEcYqF35REbtVEyZ+5DrGKfP6jpk1cnyUVGYDeqkzaoPrHFliWM4OIaWFAvuELrt LgczrfDgRWAot8+gnRuJWQOTgfjlU9k8HzPYm63OI1OjOWl8NuCCEc2hzHRxNawb9uH5 5eLg== X-Gm-Message-State: AOJu0YyAD13fzTBx5pXFdmNHlS+hw/gVssZug8JLVOrUTGkPlu5jHody sNuLdGxBZPWrmwkVJ0bJGUXmxJ4UG+tgP+yXvqGhTn8ez83MJ3C615e1kqShXx7bn4OXuVrp2mn W5Ja3Hg== X-Google-Smtp-Source: AGHT+IGneKI5lxPk80bubmN+F89A1ptQRIcrCUn8BjMqdChlaC6Nlk8Ez/Dp/6gtIzCb6k7vUSSfwg== X-Received: by 2002:a05:600c:354b:b0:425:6f96:8bde with SMTP id 5b1f17b1804b1-4257a02cf38mr5936345e9.29.1719661957822; Sat, 29 Jun 2024 04:52:37 -0700 (PDT) Received: from ?IPV6:2a01:4b00:bf09:5101:6c21:b9fe:48f5:4a1b? ([2a01:4b00:bf09:5101:6c21:b9fe:48f5:4a1b]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-4256af3cf9bsm74909305e9.8.2024.06.29.04.52.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Jun 2024 04:52:37 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------Kqs9x0WbeI4uP62EQVS9UXfJ" Message-ID: <56f90e18-ed94-4b33-bb23-021e112d1ead@scriptfusion.com> Date: Sat, 29 Jun 2024 12:52:37 +0100 Precedence: bulk list-help: <mailto:internals+help@lists.php.net list-unsubscribe: <mailto:internals+unsubscribe@lists.php.net> list-post: <mailto:internals@lists.php.net> List-Id: internals.lists.php.net MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API To: Stephen Reay <php-lists@koalephant.com> Cc: internals@lists.php.net References: <50DEC8FF-FBE1-4B39-AACD-076683499897@koalephant.com> Content-Language: en-GB In-Reply-To: <50DEC8FF-FBE1-4B39-AACD-076683499897@koalephant.com> From: bilge@scriptfusion.com (Bilge) This is a multi-part message in MIME format. --------------Kqs9x0WbeI4uP62EQVS9UXfJ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 29/06/2024 10:31, Stephen Reay wrote: >> On 29 Jun 2024, at 06:03, Bilge<bilge@scriptfusion.com> wrote: >> >> On 28/06/2024 22:35, Niels Dossche wrote: >>> - Why did you choose UrlParser to be a "static" class? >> Because "static class" is the hip new cool ;) >> >> Bilge > I would argue that for 90%+ of cases, static *userland* classes are used because of (a) autoloading and (b) the ability to use private/protected methods. > > Neither of those apply to a php extension. > > I agree with the others, the static parser class is weird. Either put the static methods on the url class, or make the parser an instance with options. No objection. I was only kidding :) Cheers, Bilge --------------Kqs9x0WbeI4uP62EQVS9UXfJ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <div class="moz-cite-prefix">On 29/06/2024 10:31, Stephen Reay wrote:<br> </div> <blockquote type="cite" cite="mid:50DEC8FF-FBE1-4B39-AACD-076683499897@koalephant.com"> <pre class="moz-quote-pre" wrap=""> </pre> <blockquote type="cite"> <pre class="moz-quote-pre" wrap="">On 29 Jun 2024, at 06:03, Bilge <a class="moz-txt-link-rfc2396E" href="mailto:bilge@scriptfusion.com"><bilge@scriptfusion.com></a> wrote: On 28/06/2024 22:35, Niels Dossche wrote: </pre> <blockquote type="cite"> <pre class="moz-quote-pre" wrap="">- Why did you choose UrlParser to be a "static" class? </pre> </blockquote> <pre class="moz-quote-pre" wrap=""> Because "static class" is the hip new cool ;) Bilge </pre> </blockquote> <pre class="moz-quote-pre" wrap=""> I would argue that for 90%+ of cases, static *userland* classes are used because of (a) autoloading and (b) the ability to use private/protected methods. Neither of those apply to a php extension. I agree with the others, the static parser class is weird. Either put the static methods on the url class, or make the parser an instance with options.</pre> </blockquote> <p>No objection. I was only kidding :)</p> <p><span style="white-space: pre-wrap">Cheers, Bilge </span></p> </body> </html> --------------Kqs9x0WbeI4uP62EQVS9UXfJ--