I have a PHP login system that should be built to run on both XAMPP and Docker at the same time. My database need to be localy stored.

I create my Container and Image like these:

Image: docker build -t php . Container: docker run -dp 9000:80 --name php-app php

```
<?php
$host = "host.docker.internal"; // need to be that or 'localhost'
$name = "test";
$user = "root";
$passwort = "";
try {
    $mysql = new PDO("mysql:host=$host;dbname=$name", $user, $passwort);
}

catch (PDOException $e) {
    echo "SQL Error: ".$e->getMessage();
}

```

?>

Where do I get the information on which system I am running to make this value dynamic?