Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Unexpected character in input: '\’ (ASCII=92)

Description

This linting error appears at linting time, until PHP introduced namespaces, whose separator is \. Then, it was added to the recognized characters.

Example

<?php

    use \A\B as C;

?>

Alternatives

  • Upgrade to PHP 5.3 or later.
  • Replace the backslash by an underscore.

Changed Behavior

This error may appear following an evolution in behavior, in previous versions. See