Answers for "syntax error, unexpected '{', expecting ']' php"

PHP
0

syntax error, unexpected token "}", expecting "," or ";" php

class Point {
  public float $x;
  public float $y;
  public float $z;

  public function __construct(
    float $x = 0.0,
    float $y = 0.0,
    float $z = 0.0
  ) {
    $this->x = $x;
    $this->y = $y;
    $this->z = $z;
  }
}
Posted by: Guest on August-07-2021
0

syntax error: word unexpected (expecting "in")

I was on a virtual machine and I started the editor with windows notepad and it converted the script to dos. So, I ended up installing dos2unix, which I used to convert the script. Then, the script worked.
Posted by: Guest on April-17-2021

Code answers related to "syntax error, unexpected '{', expecting ']' php"

Browse Popular Code Answers by Language