|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80491 [ES] curl_init() returns object instead of resource
Submitted: 2020-12-07 14:12 UTC Modified: 2021-02-03 18:18 UTC
From: ricardo at banak dot com Assigned: julionc (profile)
Status: Closed Package: Translation problem
PHP Version: 8.0.0 OS: Centos 7.9.2009
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
33 + 32 = ?
Subscribe to this entry?

 [2020-12-07 14:12 UTC] ricardo at banak dot com
Documentation states curl_init() as:

curl_init ([ string $url = NULL ] ) : resource

but the result is an object, not a resource.

Test script:
$ch = curl_init();

if (is_object($ch)) {
    echo '$ch is an object';

if (is_resource($ch)) {
    echo '$ch is a resource';

Expected result:
$ch is a resource

$ch is an object


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-07 14:16 UTC]
-Type: Bug +Type: Documentation Problem
 [2020-12-07 14:19 UTC]
-Status: Open +Status: Not a bug
 [2020-12-07 14:19 UTC]
It is the result of an intentional change: (but I could have linked the related upgrading note).

Please note that PHP 8.0 migrated quite a few other resources to objects as well. You can refer to the documentation or for more information.
 [2020-12-07 14:24 UTC] ricardo at banak dot com
Sorry, my bad.
Therefore is a documentation issue.

Thank you both.
 [2020-12-07 14:24 UTC]
-Status: Not a bug +Status: Feedback -Package: cURL related +Package: Translation problem -Assigned To: +Assigned To: cmb
 [2020-12-07 14:24 UTC]
Well, EN docs have already been updated, so this is likely about a
translation.  Which one?
 [2020-12-07 14:52 UTC] ricardo at banak dot com
-Status: Feedback +Status: Assigned
 [2020-12-07 14:52 UTC] ricardo at banak dot com
That's correct.
Spanish here.
 [2020-12-07 15:01 UTC]
-Summary: curl_init() returns object instead of resource +Summary: [ES] curl_init() returns object instead of resource
 [2020-12-07 15:01 UTC]
Thanks for the swift reply.
 [2020-12-07 15:05 UTC]
-Assigned To: cmb +Assigned To:
 [2021-02-03 18:18 UTC]
-Assigned To: +Assigned To: julionc
 [2021-02-03 18:29 UTC]
Automatic comment on behalf of julionc
Log: Fix #80491: [ES] curl_init() returns object instead of resource
 [2021-02-03 18:29 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jul 06 10:03:41 2022 UTC