var_dump(
str_replace(['suzuri', 'minne'], ['lolipop', 'colorme'], 'lolipop-colorme-suzuri-minne')
);
string(31) "lolipop-colorme-lolipop-colorme"
$var = '0';
var_dump(isset($var));
$var = '0';
var_dump(empty($var));
$var = '0';
var_dump(is_null($var));
bool(true)
bool(true)
bool(false)
$array = [
"0" => "a",
" 0"=> "b",
"01" => "c",
null => "d",
"e",
true => "f",
false => "g",
];
$number = count(array_keys($array));
var_dump($number);
int(5)
class A {
public static function hoge(): string {
return '4';
}
}
class B extends A {
public static function hoge(): string {
return '9';
}
public static function test(): string {
return static::hoge() . parent::hoge() . self::hoge();
}
}
class C extends B {
public static function hoge(): string {
return '94';
}
}
echo C::test() . PHP_EOL;
9449
$keys = ['G','M','O',1,'N','T','E','R','N','E','T'];
function strSort($a, $b) {
return $a < $b ? -1 : 1;
};
usort($keys, 'strSort');
var_dump(implode($keys));
string(11) "1EEGMNNORTT"