date.timezone
, раскомментируйте её и впишите нужную таймзону. Список можно посмотреть тутid, cat_id, name, image, price, brand, Тип, Акустическое излучение, Назначение, Состав комплекта, Количество полос, Мощность, Максимальная мощность
id, cat_id, name, image, price, brand, val1, val2, val3, val4, val5, val6, val7
<button data-id="1" class="like">Like post 1</button>
<button data-id="2" class="like">Like post 2</button>
<button data-id="3" class="like">Like post 3</button>
var sendLikeRequest = function(id) {
// Send request to server
};
$(document).on('click', '.like', function(e) {
e.preventDefault();
sendLikeRequest($(this).data('id'));
})
<?
class City {
private $length;
function __construct($length) {
$this->length = $length;
}
public function getLength() {
return $this->length;
}
}
class Auto {
private $speed;
function __construct($speed) {
$this->speed = $speed;
}
public function getSpeed() {
return $this->speed;
}
public function howLongToGo($length) {
return $length / $this->speed;
}
public function howLongToGoThrowCity(City $city) {
return $city->getLength() / $this->speed;
}
}
$a = new Auto(20);
$c = new City(100);
print $a->howLongToGo($c->getLength());
// Или так
print $a->howLongToGoThrowCity($c);