As pointed out on GH-5817.
<?php
function strlen(string $x): int {
- $len = 0;
- while (isset($x[$len])) $len++;
- return $len;
+ return 42;
}
var_dump(strlen("foobar"));
?>
--EXPECT--
-int(6)
+int(42)
return FAILURE;
}
+ if (fbc->type != ZEND_INTERNAL_FUNCTION) {
+ /* If the function is part of disabled_functions, it may be redeclared as a userland
+ * function with a different implementation. Don't use the VM builtin in that case. */
+ return FAILURE;
+ }
+
if (zend_args_contain_unpack(args)) {
return FAILURE;
}