Hello. I hope you can help me. Can you tell me what the difference is between these expressions?

"Keep silent, boys", said the teacher.

"Keep silent, boys", the teacher said.

Thank you very much.
With pronouns, however, the inverted form sounds stilted and old-fashioned, and is seldom used nowadays:

(??) 'Keep silent boys,' said I / you / he / they / we.
Absolutely nothing, except what you see and hear when you read it. It would simply be a stylistic choice. Grammatically they are tautological (identical).
Try out our live chat room.
both are true. You can say or write what you want
 Mister Micawber's reply was promoted to an answer.