Title: PHP Parse error: syntax error, unexpected &#8216;:&#8217;, expecting &#8216;;&#8217; or &#8216;{&#8216;
Last modified: February 21, 2023

---

# PHP Parse error: syntax error, unexpected ‘:’, expecting ‘;’ or ‘{‘

 *  [timsu2009](https://wordpress.org/support/users/timsu2009/)
 * (@timsu2009)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-expecting-or/)
 * There was a PHP error in user-role-editor/includes/classes/base-lib.php on line
   119 when our hosting PHP version updated from v5.6 to v7.3. Can you fix it?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Vladimir Garagulya](https://wordpress.org/support/users/shinephp/)
 * (@shinephp)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-expecting-or/#post-16542075)
 * Hi,
 * PHP 7.3 is still quite old. You may use this quick fix – remove ‘string’ type
   definition from the line #119. Replace:
 * `public static function filter_string_polyfill(string $string): string {`
 * with
 * `public static function filter_string_polyfill( $string ) {`

Viewing 1 replies (of 1 total)

The topic ‘PHP Parse error: syntax error, unexpected ‘:’, expecting ‘;’ or ‘{‘’ 
is closed to new replies.

 * ![](https://ps.w.org/user-role-editor/assets/icon-256x256.jpg?rev=1020390)
 * [User Role Editor](https://wordpress.org/plugins/user-role-editor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-role-editor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-role-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/user-role-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-role-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-role-editor/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Vladimir Garagulya](https://wordpress.org/support/users/shinephp/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-expecting-or/#post-16542075)
 * Status: not resolved