inurl filters so that the result URLs must contain the keyword specified. So inurl:w3 would only show results where w3 is in the URL. It works for this use case but it's better to just use site like you mentioned.
You can't even fully rely on those operatorsike site: anymore because Google now happily serves you results from miscreants that tag their scam site urls with valid site names, so instead of getting results from only let's say mozilla.org, you also now get them from their scamsite because they appended the actual mozilla site url into their own.