Contributor
Huh? The name is horrible. Can't you just make preg_replace_callback accept an array of callbacks as its 2nd parameter? Would be consistent with preg_replace.
Member
@Majkl578 That would be ambiguous, because an array can be a valid callback.
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why change this? nothing changed.
Contributor Author
@laruence , thanks for you review. I updated it already.
Contributor
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reason for using create_function() here instead of a regular anonymous function?
Contributor Author
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@datibbaw actually, no. ext/pcre/tests/preg_replace_callback_array.phpt and ext/pcre/tests/preg_replace_callback_array2.phpt are modified on the basis of preg_replace_callback.phpt and preg_replace_callback2.phpt
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not if (zcount && Z_TYPE_P(zcount))? it is more readable
Member
@zxcvdavid I think you'd better drop a mail to @internal , if no objections, I will merge this... thanks
Contributor Author
@laruence i've sent the mail. Thanks for your reminding.