in_array
$list = [1, 2, 3, 4, 5];
in_array(5, $list, true);
#str_split
http://php.net/manual/ja/function.str-split.php
$str = 'Hello World';
$arr = str_split($str);
#trim(fgets(STDIN))
標準入力
array_search
$list = [1, 2, 3, 4, 5,];
$index = array_search(5, $list, true);