I'm used to use php -S 0.0.0.0:8080
while developing, because it saves me some time configuring a real web server. Until today I didn't miss anything about it, but now I need to develop a function that uses subdomains.
I must access http://foo-bar.localhost:8080
and make php see the request, because I'm trying to implement this.
Also, foo-bar
is dynamic (like the language
subdomain in the documentation of Yii2 I linked) so I need php to be able to handle all subdomains of localhost
.
Is that possible? How?