|
|
|
|
|
by butteroverflow
2548 days ago
|
|
>PHP Oh no, don't even put them in the same sentence. I am no fan of Go, but its error handling approach is beautiful compared to PHP. Every time I call an internal function I have to go through the docs — does it return a NULL, an int, a boolean, or something else? Does 0 signal an error condition, or is it a valid value? Do I have to perform a strict check for NULL/false then? Or is it -1 (see link below)? The situation is generally better with third-party libraries though — they tend to just throw exceptions (if that matches your definition of "better"). https://www.php.net/manual/en/function.openssl-verify.php |
|
For your example of openssl_verify see https://linux.die.net/man/3/x509_verify_cert
It can certainly be confusing but at least it is documented.