--TEST-- Invalid SplFileObject::getCurrentLine() return type --FILE-- current()); } catch (TypeError $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- TypeError: MySplFileObject::getCurrentLine(): Return value must be of type string, array returned