Generation

generate functionFri, 30 Dec 2022

check if value of an array starts with value of another array

function startsWith($prefix, $string) { return substr($string, 0, strlen($prefix)) === $prefix; }

Questions about programming?Chat with your personal AI assistant