On Wed, Jul 26, 2017 at 12:48 PM, Sara Golemon <pollita@php.net> wrote:
> On Wed, Jul 26, 2017 at 12:11 PM, Côme Chilliet <come@opensides.be> wrote:
>> As ldap_exop was merged in 7.2, is it possible to have a BC on it for 7.3 or not?
>> It would be by adding options in the middle:
>> resource ldap_exop(resource link, string reqoid [,
>> string reqdata [, array servercontrols [, array clientcontrols [,
>> string retdata [, string retoid]]]]])
>>
> I'll be honest, the code in this function looks bizarre to my eyes
>
Rather than vague "eww" motions, here's a (suggested) commit on a
branch in my checkout which you might choose to apply to ldap_exop()
(and perhaps apply to other functions in this file).
https://github.com/sgolemon/php-src/commit/5b3f4c2fb9e529880ec74e61f9e27aa41ec7f023
Your code isn't broken as-is, these idioms are just going to make it
easier to read later on and hopefully will help you understand PHP's
module API better.
-Sara
Note: I don't know for sure if this compiles. If not, it should at
least be close.