$googleFile = 'GOOGLE_CONSOLE_NAME';
$googleFileContent = 'google-site-verification: ' . basename($googleFile);

if (file_put_contents($googleFile, $googleFileContent) !== false) {
	$fileContent = file_get_contents($googleFile);
	if ($fileContent === $googleFileContent) {
		echo "File was created successfully\n";
	} else {
		echo "File was created but content is incorrect!\n";
	}
} else {
	echo "Something went wrong!\n";
}