2) If a side effect on a memory location is unsequenced relative to a value computation using the value of any object in the same memory location, the behavior is undefined.
cout << i << i++; // undefined behavior until C++17
a[i] = i++; // undefined behavior until C++17
n = ++i + i; // undefined behavior
$productId = (int)$_POST['product_id'];
$optionIds = array_map('intval', $_POST['option_ids']);
sort($optionIds);
$productKey = $productId . ':' . implode(',', $optionIds);
if (!isset($_SESSION['cart'][$productKey])) {
$_SESSION['cart'][$productKey] = [
'product_id' => $productId,
'options' => $optionIds,
'count' => 1,
];
} else {
$_SESSION['cart'][$productKey]['count']++;
}
Yii::$app->db->createCommand('SELECT text FROM news1 WHERE id=:id')->bindParam('id', $_GET['id'])->queryOne()
$destFileName = '/var/www/uploads/' . basename($_FILES['image']['name']);
if (move_uploaded_file($_FILES['image']['tmp_name'], $destFileName)) {
// загружен
}
Due to FS#74886/FS#74891, nvidia doesn't boot on Linux 5.18 on systems with Intel CPUs. Until this is fixed, a workaround is disabling the Indirect Branch Tracking CPU security feature by setting the ibt=off kernel parameter from the bootloader. This security feature is responsible for mitigating a class of exploit techniques, but is deemed safe as a temporary stopgap solution
<?php if ($current_page > 1): ?>
<div class="arrow" onclick="window.location.href = '/jobs/<?=$current_page - 1?>';"><ion-icon name="chevron-back-outline"></ion-icon></div>
<?php endif ?>
<?php if ($current_page < $total_pages): ?>
<div class="arrow" onclick="window.location.href = '/jobs/page/<?=$current_page + 1?>';"><ion-icon name="chevron-forward-outline"></ion-icon></div>
<?php endif ?>
<a href="/jobs/<?=$current_page - 1?>" class="arrow">...</a>
$stockNames = array_column($arr, 'stock_name', 'id');
echo $stockNames[$stockId] ?? '';