wordleGuess

PHP, though. Also, completely ignoring multibyte strings or actually checking word lengths and stuff.

function wordleGuess(string $word, string $solution) {
  for ($i = 0; $i < 5; $i++) {
    if ($word[$i] === $solution[$i]) {
      echo '🟩';
    } elseif (strpos($solution, $word[$i]) !== false) {
      echo '🟨';
    } else {
      echo '⬛';
    }
  }
}