I try to create an array with the data, and in the browser I write Parse error: syntax error, unexpected '[' in C:\...\curpPost.php on line 2 that is, it swears at [ .

Here is the code itself:

 $post = [ 'op'=>'login', 'dest'=> 'https://.../', 'user'=> 'login', 'passwd'=>'qwerty', ]; 
  • one
    PHP version what? - rjhdby
  • it is obvious that PHP version is needed> = 5.4 - Alexey Shimansky
  • If you look through cmd then 5.6, and in the very OpenServer 5.3 (xs, this is normal or not). But I figured out the problem, instead of "$ post = [" wrote "$ post = array (". Does this mean that I still have version 5.3? Thanks for the response! - r.mcreal
  • Put in the openserver version above, and that's all. (settings → modules → php) ........ your version is lower than 5.4, yes - Alexey Shimansky
  • Put 5.4. He does not want to go above, for some reason, OpenServer simply does not start after saving the settings - r.mcreal

0