Warning: openssl_encrypt(): Using an empty Initialization Vector (iv) is potentially insecure and not recommended in … string(24) “5kBbn5hweqDYYT6VQjj2ag==”
class Hoge {
public function f1() {
echo __METHOD__, PHP_EOL;
return $this;
}
public function f2() {
echo __METHOD__, PHP_EOL;
return null;
}
public function f3() {
echo __METHOD__, PHP_EOL;
return $this;
}
}
$val = (new Hoge())?->f1()?->f2()?->f3();
var_dump($val);
class Hoge {
final private function pFunc1() {
echo __METHOD__, PHP_EOL;
}
}
class Foo extends Hoge {
private function pFunc1() {
parent::pFunc1();
echo __METHOD__, PHP_EOL;
}
public function callPri() {
$this->pFunc1();
}
}
(new Foo())->callPri();
PHP 7.4 で動かすと、結果は次のとおりとなる。
PHP Fatal error: Cannot override final method Hoge::pFunc1() in …
このコマンドを実行すると、対話形式で以下の情報を入力できます: Country Name (国名): JP State (都道府県): Tokyo Locality (市区町村): Tokyo Organization Name (組織名) Organizational Unit Name (部門名) Common Name: localhost Email Address (メールアドレス)
-----
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:Tokyo
Locality Name (eg, city) []:Shinjuku
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:localhost
Email Address []:
このコマンドで以下のファイルが生成されます:
server.key: 秘密鍵
server.crt: 証明書
作業したいフォルダで右クリック
「Open Git Bash here」を選択
Apacheの設定
Apache設定ファイル(apache\ssl.conf)でSSL関連の設定
<VirtualHost *:443>
ServerName localhost
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
<Directory /var/www/html>
Require all granted
</Directory>
</VirtualHost>
string(3) “aaa” Warning: Array to string conversion in … Warning: Undefined variable $Array in … Warning: Trying to access array offset on value of type null in … Warning: Trying to access array offset on value of type null in … NULL
一方で PHP 5 で実行すると、結果は次のとおりとなる。
Warning: Illegal string offset ‘bar’ in … Warning: Illegal string offset ‘baz’ in … Notice: Undefined variable: a in … NULL string(3) “awk”