Hallo,
was erwartet ihr bei folgendem Konstrukt für eine Ausgabe?
(man beachte 2x $collation)
Doch eigentlich das hier:
Lustigerweise kommt aber das hier heraus:
Man beachte, dass $characterSet NULL ist. Das Problem liegt in der Variablen $collation, die ich zweimal für die Zuweisung verwende, einmal in list() und einmal bei der Zuweisung rechts von =
Aber warum ist dann $characterSet NULL?
was erwartet ihr bei folgendem Konstrukt für eine Ausgabe?
PHP-Code:
<?php
echo '<pre>';
var_dump($collation);
list ($characterSet, $collation, $compare) = $collation;
var_dump($characterSet, $collation, $compare);
echo '</pre>';
?>
Doch eigentlich das hier:
Code:
array(3) {
[0]=>
string(4) "utf8"
[1]=>
NULL
[2]=>
string(3) "bin"
}
string(4) "utf8"
NULL
string(3) "bin"
Code:
array(3) {
[0]=>
string(4) "utf8"
[1]=>
NULL
[2]=>
string(3) "bin"
}
NULL
NULL
string(3) "bin"
Aber warum ist dann $characterSet NULL?

Kommentar