diff --git a/cal.php b/cal.php
index b8f71fd84f..ea4f798ec4 100644
--- a/cal.php
+++ b/cal.php
@@ -173,18 +173,18 @@
"\n",'
',"\n";
// Print out headers for weekdays
-for ($i = 0; $i < 7; $i++) {
+for ($i = 0; $i < 7; ++$i) {
echo '', date("l",mktime(0,0,1,4,$i+1,2001)), " | \n";
}
echo "
\n";
// Generate the requisite number of blank days to get things started
-for ($days = $i = date("w",$bom); $i > 0; $i--) {
+for ($days = $i = date("w",$bom); $i > 0; --$i) {
echo ' | ';
}
// Print out all the days in this month
-for ($i = 1; $i <= date("t",$bom); $i++) {
+for ($i = 1; $i <= date("t",$bom); ++$i) {
// Print out day number and all events for the day
echo ' | ';
}
diff --git a/images/elephpants.php b/images/elephpants.php
index 361d6c58b9..86b0a8c94c 100644
--- a/images/elephpants.php
+++ b/images/elephpants.php
@@ -74,7 +74,7 @@
continue;
}
- $got++;
+ ++$got;
// add photo to response array.
$elephpants[] = array(
'title' => $photo['title'],
diff --git a/manual/vote-note.php b/manual/vote-note.php
index 4a007d56c9..6bd1cb8eae 100644
--- a/manual/vote-note.php
+++ b/manual/vote-note.php
@@ -61,10 +61,10 @@
}
else {
if ($_REQUEST['vote'] === 'up') {
- $N[$_REQUEST['id']]['votes']['up']++;
+ ++$N[$_REQUEST['id']]['votes']['up'];
}
elseif ($_REQUEST['vote'] === 'down') {
- $N[$_REQUEST['id']]['votes']['down']++;
+ ++$N[$_REQUEST['id']]['votes']['down'];
}
$update = $N[$_REQUEST['id']]['votes']['up'] - $N[$_REQUEST['id']]['votes']['down'];
$hash = substr(md5($_REQUEST['page']), 0, 16);
diff --git a/releases/index.php b/releases/index.php
index e60e36eabe..dd698b0f4d 100644
--- a/releases/index.php
+++ b/releases/index.php
@@ -36,7 +36,7 @@
$release['supported_versions'] = $supportedVersions[$ver] ?? [];
}
$machineReadable[$version] = $release;
- $count++;
+ ++$count;
}
}
@@ -100,7 +100,7 @@
$i = 0;
foreach($a as $ver => $release) {
- $i++;
+ ++$i;
mk_rel(
$major,
$ver,
@@ -172,7 +172,7 @@ function recentEOLBranchesHTML(): string {
foreach (get_eol_branches() as $branches) {
foreach ($branches as $branch => $detail) {
$detail_date = $detail['date'];
- while (isset($eol[$detail_date])) $detail_date++;
+ while (isset($eol[$detail_date])) ++$detail_date;
$eol[$detail_date] = sprintf('%s: %s', $branch, date('j M Y', $detail_date));
}
}
diff --git a/security/index.php b/security/index.php
index b6d2bc1737..c3719c4d52 100644
--- a/security/index.php
+++ b/security/index.php
@@ -43,7 +43,7 @@
$RECORDS[$record_no]["id"] = $record_no;
}
$field = null;
- $record_no++;
+ ++$record_no;
continue;
}
if(preg_match("/^([-\w]+):\s*(.*)/", $s, $m)) {
diff --git a/submit-event.php b/submit-event.php
index 98892a77b8..ce22722300 100644
--- a/submit-event.php
+++ b/submit-event.php
@@ -151,10 +151,10 @@
if (count($errors)) { display_errors($errors); }
// Generate days and months arrays for form
-for ($i = 1; $i <= 7; $i++) {
+for ($i = 1; $i <= 7; ++$i) {
$days[$i] = date('l', mktime(12, 0, 0, 4, $i));
}
-for ($i = 1; $i <= 12; $i++) {
+for ($i = 1; $i <= 12; ++$i) {
$months[$i] = date('F', mktime(12, 0, 0, $i, 1));
}