- str_replace: documentation ( source)
- explode: documentation ( source)
- trim: documentation ( source)
- fgets: documentation ( source)
<?php
$input_str = trim(fgets(STDIN));
$input_str = str_replace(array("\r\n", "\n", "\r"), "", $input_str);
$words = explode(" ", $input_str);
$words[0] = 'apple';
$words[1] = 'apple';
echo $words[0] === $words[1];