DockerでPHPを動かそう

$ sudo docker run –rm php:8.0-rc php -v
$ echo “ index.php
$ docker run –rm -p 8000:80 -v `pwd`:/var/www/html php:8.0-rc-apache

declare(strict_types=1);

$f = function(int|string $v){
	var_dump($v);
};

$f(100);
$f("abc");
$f(true);
declare(strict_types=1);

final class User {
	public function __construct(
		public int $id,
		private string $name,
	){}
}

var_dump(new User(1, 'Foo'));

ふむー