]> granicus.if.org Git - php/commit
Allow casting CurlHandle to int
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 19 Jun 2020 14:50:59 +0000 (16:50 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 19 Jun 2020 21:05:47 +0000 (23:05 +0200)
commit1c4463c77aa0291d065d5177428bbe080ca4755a
treec313cf36313287547940ade9d4c3545140178725
parent7e2147be23ee8720f9e462a93af55917d2bd3985
Allow casting CurlHandle to int

(int) $curlHandle will return spl_object_id($curlHandle). This
makes curl handle objects backwards compatible with code using
(int) $curlHandle to obtain a resource ID.

Closes GH-5743.
ext/curl/interface.c
ext/curl/tests/curl_int_cast.phpt [new file with mode: 0644]