Unintentional syntax mistakes in the PHP and Ruby versions

I decided to fix this mistake in my version, because it doesn't add to the Legacy Codeness of the project. It's a real mistake in porting.