4 ms·
I think your parent was referring to why php's implementation is so complex.
by mediocregopher 13y ago
I think your parent was referring to why php's implementation is so complex.
- dannypgh 13y agoIndeed. PHP is often criticized for having inconsistently named or patterned libraries, and the response is usually "PHP is a relatively light wrapper to a bunch of C libraries" -- In fact I saw 3 versions of strstr in PHP core - strstr, mb_strstr, and grapheme_strstr. I guess I would have expected one of them to be a somewhat thin wrapper around libc's strstr. As another commentator pointed out, libc's strstr assumes NUL-terminated strings. Maybe php's doesn't? Which seems a bit odd to me in light of the explanation of PHP's genesis as having roots in C, but stranger things... I'm not surprised at all that libc's strstr would be complex.