紀錄在 Debian 上安裝 PHP 8.3 的步驟
apt-get install -y apt-transport-https lsb-release ca-certificates
wget -O
# Typed Class Constants
8.2 之前,儘管 Interface 定義 constant 的型別,但在 child class 卻可以 overwrite 這個型別
從 8.3 開始, child class constant 可以 overwrite constant,但型別不可變
# The json_validate() function
Scenario
Assuming that today, I have a method sleep(). This method takes in the number of seconds as an argument. Typically, we would write it like this:
However, what if a negative value is passed as an argument? This is obviously not…
# Readonly classes
可以讓一個 class readonly, 也就是該 class 內的所有 property 都只能 read, 也不能動態的建立 property, 官方範例如下:
前言