Skip to main content
The 2024 Developer Survey results are live! See the results
deleted 3 characters in body
Source Link
Dharman
  • 32.5k
  • 25
  • 94
  • 140

Unexpected :

1. PHP 8 named parameter syntax

unexpected ':', expecting ',' or ')'

If attempting to use PHP 8's new named parameter functionality in a version of PHP < 8 this error will occur:

$table->string(column:'Name');

Solutions:

  1. Upgrade your version of PHP to PHP 8.80.0 or higher
  2. Do not use named parameters (pass the parameters in in the order they are expected)

2. Cropped class :: separator

An error message that begins Parse error: syntax error, unexpected ':' can be caused by mistakenly writing a class static reference Class::$Variable as Class:$Variable.

Unexpected :

1. PHP 8 named parameter syntax

unexpected ':', expecting ',' or ')'

If attempting to use PHP 8's new named parameter functionality in a version of PHP < 8 this error will occur:

$table->string(column:'Name');

Solutions:

  1. Upgrade your version of PHP to PHP 8.8.0 or higher
  2. Do not use named parameters (pass the parameters in in the order they are expected)

2. Cropped class :: separator

An error message that begins Parse error: syntax error, unexpected ':' can be caused by mistakenly writing a class static reference Class::$Variable as Class:$Variable.

Unexpected :

1. PHP 8 named parameter syntax

unexpected ':', expecting ',' or ')'

If attempting to use PHP 8's new named parameter functionality in a version of PHP < 8 this error will occur:

$table->string(column:'Name');

Solutions:

  1. Upgrade your version of PHP to PHP 8.0.0 or higher
  2. Do not use named parameters (pass the parameters in the order they are expected)

2. Cropped class :: separator

An error message that begins Parse error: syntax error, unexpected ':' can be caused by mistakenly writing a class static reference Class::$Variable as Class:$Variable.

added 280 characters in body
Source Link
mario
  • 145.1k
  • 20
  • 240
  • 293

Unexpected :

1. PHP 8 named parameter syntax

unexpected ':', expecting ',' or ')'

If attempting to use PHP 8's new named parameter functionality in a version of PHP < 8 this error will occur:

$table->string(column:'Name');

Solutions:Solutions:

  1. Upgrade your version of PHP to PHP 8.8.0 or higher
  2. Do not use named parameters (pass the parameters in in the order they are expected)

2. Cropped class :: separator

An error message that begins Parse error: syntax error, unexpected ':' can be caused by mistakenly writing a class static reference Class::$Variable as Class:$Variable.

unexpected ':', expecting ',' or ')'

If attempting to use PHP 8's new named parameter functionality in a version of PHP < 8 this error will occur:

$table->string(column:'Name');

Solutions:

  1. Upgrade your version of PHP to PHP 8.8.0 or higher
  2. Do not use named parameters (pass the parameters in in the order they are expected)

Unexpected :

1. PHP 8 named parameter syntax

unexpected ':', expecting ',' or ')'

If attempting to use PHP 8's new named parameter functionality in a version of PHP < 8 this error will occur:

$table->string(column:'Name');

Solutions:

  1. Upgrade your version of PHP to PHP 8.8.0 or higher
  2. Do not use named parameters (pass the parameters in in the order they are expected)

2. Cropped class :: separator

An error message that begins Parse error: syntax error, unexpected ':' can be caused by mistakenly writing a class static reference Class::$Variable as Class:$Variable.

edited body
Source Link
John Conde
  • 218.9k
  • 99
  • 461
  • 501

unexpected ':', expecting ',' or ')'

If attempting to use PHP 8's new named parameter functionality in a version of PHP < 8 this error will occur:

$table->string(column:'Name');

Solutions:

  1. Upgrade your version of PHP tpto PHP 8.8.0 or higher
  2. Do not use named parameters (pass the parameters in in the order they are expected)

unexpected ':', expecting ',' or ')'

If attempting to use PHP 8's new named parameter functionality in a version of PHP < 8 this error will occur:

$table->string(column:'Name');

Solutions:

  1. Upgrade your version of PHP tp PHP 8.8.0 or higher
  2. Do not use named parameters (pass the parameters in in the order they are expected)

unexpected ':', expecting ',' or ')'

If attempting to use PHP 8's new named parameter functionality in a version of PHP < 8 this error will occur:

$table->string(column:'Name');

Solutions:

  1. Upgrade your version of PHP to PHP 8.8.0 or higher
  2. Do not use named parameters (pass the parameters in in the order they are expected)
Source Link
John Conde
  • 218.9k
  • 99
  • 461
  • 501
Loading
Post Made Community Wiki by John Conde