strcmp()
function strcmp(string $string1, string $string2): int
Binary safe string comparison. Returns negative, zero, or positive.
Parameters:
$string1(string)$string2(string)
Returns: int
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/string/strcmp.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how strcmp is implemented in the compiler, see the internals page.