PHP
25
Вклад в тег
<?php
namespace myNameSpace;
function in_array($value, $arr)
{
return 'Local function';
}
$arr = [1, 2, 3];
$value = 1;
var_dump(in_array($value, $arr));
var_dump(\in_array($value, $arr));
string(14) "Local function"
bool(true)
public function addToSwimmingPool(Swimming $animal): void
{
$this->pool[] = $animal;
}
public function addToSwimmingPool($animal): void { ... }
public function addToSwimmingPool(Penguin $animal): void { ... }