If either operand is of type double, the other is converted to double.
Otherwise, if either operand is of type float, the other is converted to float.
Otherwise, if either operand is of type long, the other is converted to long.
Otherwise, both operands are converted to type int.
if (Yii::$app->getUser()->login($user))
И еще на счет работы самого rsplit: почему не режется вот эта часть "tp://demo"?