Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118000 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 83251 invoked from network); 19 Jun 2022 01:04:52 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Jun 2022 01:04:52 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CE0A91804D0 for ; Sat, 18 Jun 2022 19:53:30 -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.7 required=5.0 tests=BAYES_00, 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-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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 ; Sat, 18 Jun 2022 19:53:30 -0700 (PDT) Received: by mail-lj1-f169.google.com with SMTP id b7so8486244ljr.6 for ; Sat, 18 Jun 2022 19:53:30 -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=8FhD7kUaEPqfZfaCHLwYWGH2O4Gtn2WiNT1wzEM/QKg=; b=CF1GiL2RLZsThpuQfwytuGPlUcQFSswlOX919SlA8iweA5AlObQ344kle7TY6w8leo iwjy9sJvDCGrpfJoNnv6+CDlPrgta7JBpcEAcMsIWwepkv8d4V5xb9ZUmMuQJ+HUnHlQ vcJa8aYrXqb7D58m57s1i9+nEE3tLwaL7uyWy415eNIyTE5bAb1qPMs4MNRt+m1G89Zr ECkTFt+Mxc2mC/eepXHw7xp+NHj6tIppbe80FBXaE3zU3RMQgTfJ9KA3LZP+7KS/n7j3 CKNZnlCh4OBRjOoKtaQUX+B9C4UnzGwpKq5eaksdRARVEW0sNi/IVgDEUet7frJIENVI ZzVQ== X-Gm-Message-State: AJIora8ZtEfDU1tnd0hfDcq0FriC+xXkMgZSDGXgC3wMrv2gqMUxpK6l m6W5ChHKk4kbMbRi1FugkOXxWSRtR/NGAjqYCJ8WvQ== X-Google-Smtp-Source: AGRyM1vJC3N+94VVkGLDqf4uA7Wer8Xnzj10LphhQ768mHBCK92cu4qoTWEfPzyiPvrX/+kiKZuD1N3oGkNpcULtcAM= X-Received: by 2002:a2e:8907:0:b0:259:1208:350 with SMTP id d7-20020a2e8907000000b0025912080350mr8304846lji.179.1655607208596; Sat, 18 Jun 2022 19:53:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 18 Jun 2022 22:53:17 -0400 Message-ID: To: Sara Golemon Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000008e6e2f05e1c41721" Subject: Re: [PHP-DEV] Discussion about new Curl URL API and ext/curl improvements From: pierrick@php.net (Pierrick Charron) --0000000000008e6e2f05e1c41721 Content-Type: text/plain; charset="UTF-8" Hi Sara > This is so bizarre, I *know* I wrote an OOPified cURL extension some years > ago (called it curli), and now I can't find it anywhere. What universe am > I even in? > I don't know but if you pass through the parallel universe where Curli is, I'm interested. > > Anyway, +1 on making a whole new OOPified cURL implementation. $ch = > (new CurlHandle($uri))->setOpt(Curl::OPT_METHOD, 'post')->perform(); > Let it throw exceptions, do proper type checks, all the goodness. Let the > procedural APIs behave differently than the object methods and that's okay. > > cURL is a foundational extension in PHP and I respect the choices that > were made in its API design, but it's 2022, and we deserve a better > ext/curl. > I hope you don't mind, I took some of your code from your "Enable strict_types checking for curl_setopt()" pull request [1] to do some test on introducing this but only on the OOP API. It's working very well [2]. Can I know why this PR was closed ? Any issues ? Or was it more because it was too much of a change for the procedural API ? Thanks Pierrick [1] https://github.com/php/php-src/pull/2495 [2] https://github.com/adoy/php-src/pull/2 --0000000000008e6e2f05e1c41721--