Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

null coalesce does exist in php according to the google (per: http://stackoverflow.com/questions/1013493/coalesce-function-for-php https://stackoverflow.com/questions/1013493/coalesce-function-for-php )

$s = $_SERVER["HTTPS"] ?: "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;

I'm not super familiar with php, but I think this should work from what I understand you're doing here.

null coalesce does exist in php according to the google (per: http://stackoverflow.com/questions/1013493/coalesce-function-for-php )

$s = $_SERVER["HTTPS"] ?: "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;

I'm not super familiar with php, but I think this should work from what I understand you're doing here.

null coalesce does exist in php according to the google (per: https://stackoverflow.com/questions/1013493/coalesce-function-for-php )

$s = $_SERVER["HTTPS"] ?: "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;

I'm not super familiar with php, but I think this should work from what I understand you're doing here.

Source Link
Jimmy Hoffa
  • 1.6k
  • 10
  • 19

null coalesce does exist in php according to the google (per: http://stackoverflow.com/questions/1013493/coalesce-function-for-php )

$s = $_SERVER["HTTPS"] ?: "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;

I'm not super familiar with php, but I think this should work from what I understand you're doing here.

lang-php

AltStyle によって変換されたページ (->オリジナル) /