Kimberly Mullins
Kimberly Mullins

Reputation: 101

Parse error: syntax error

what is this error ?

Parse error: syntax error, unexpected T_VAR in D:\xampp\htdocs\mehdi\application\libraries\phpass-0.1\PasswordHash.php on line 32

code:

$iteration_count_log2 = $params['phpass_hash_strength'];
        $portable_hashes = $params['phpass_hash_portable']; 
    var $itoa64; //line 32
    var $iteration_count_log2;
    var $portable_hashes;
    var $random_state;

Upvotes: 1

Views: 1608

Answers (2)

Jaime
Jaime

Reputation: 1410

Remove 'var' from each of your variables.

Upvotes: 1

Pascal MARTIN
Pascal MARTIN

Reputation: 401152

You must not use var to declare a variable : just assign a value to it, when you need it :

$your_variable = 5647;


And if you really want your variables listed beforehand, just assign something that would mean no-value to them, like, for instance, null :

$your_variable = null;


Just so you know : var was used, in PHP 4 (and, as such, is still valid in PHP 5, for that same usage) to declare classes properties.

Upvotes: 4

Related Questions