<?php
$hotels = [
['Cala', 3, 8.7, 6],
['Ocean', 3, 8.2, 6],
['Orchid', 3, 8.0, 7],
['Ya', 3, 8.7, 7],
['Chaba', 3, 8.2, 7],
];
$totalHotelsNumber = 2;
$starCoef = 0.2;
$ratingCoef = 2;
for ( $i=0; $i<count($hotels); $i++ ) {
for ( $j=$i; $i<count($hotels); $j++ ) {
echo 'Comparing '$i.' and '.$j."\r\n";
}
}
- Output for 5.4.0 - 5.4.28
- Parse error: syntax error, unexpected '$i' (T_VARIABLE), expecting ',' or ';' in /in/PAn1d on line 18
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected '[' in /in/PAn1d on line 3
Process exited with code 255.
preferences:
180.6 ms | 1395 KiB | 65 Q