My boyfriend kicked me out

Last week I went over to my boyfriends house. I got there around 2pm & we both planned on me staying the night. At around 11:30pm he gets a phone call. Immediately after he looks at me and says “you’re going to have to leave because my cousins from out of town are on their way here”. I told him to call back and tell them to find somewhere else to go. He refused & insist that I have to leave now. Obviously I was hurt and heartbroken. To make things worst I had no money to get back home because my direct deposit wouldn’t clear until 3am. I asked him for some money he claims he didn’t have any either. It’s 12am & I’m stuck walking home & he just doesn’t care. I tried calling him when I arrived home safely but all he said was “ok good” then hung up. I tried calling back and he kept sending me to voicemail then eventually blocked me from calling him. Who treats someone they’ve been in a relationship for 4 years like this? He has never done this before. I don’t know where this behavior is coming from. I’m afraid to tell any of my friends for their feedback because I’m just so damn embarrassed. I don’t know what to do with him anymore