function bubbleSort($nums) {
if (count($nums) <= 1) {
return $nums;
}
// 為每個值去比對所有值
foreach($nums as $currentKey => $currentNum) {
foreach($nums as $nextKey => $nextNum) {
// 如果 `當前值` 比 `被比較的值` 大,則與該值交換位置,已達到遞增排序。如要遞減,則改成小於即可。
-
Error message
cURL error 60: SSL certificate problem: unable to get local issuer certificate
-
search php openssl cafile setting and copy this path
// in php.ini
openssl.cafile = "/opt/homebrew/etc/openssl@1.1/cert.pem"
- make sure your OpenSSL is the latest (optional)
brew upgrade openssl@1.1