Title: Errors parsing Standard input code: Bitwise OR &#8216;|&#8217;
Last modified: January 28, 2021

---

# Errors parsing Standard input code: Bitwise OR ‘|’

 *  Resolved [Matt](https://wordpress.org/support/users/silvercolt45/)
 * (@silvercolt45)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/errors-parsing-standard-input-code-bitwise-or/)
 * I hope someone can assist me with identifying why WordPress rejects the “|” (
   pipes) used as bitwise OR statements for the variable types.
 *     ```
       if (!function_exists('mb_convert_encoding')) {
           function mb_convert_encoding(array|string $string, string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); }
       }
       ```
   
 * I am running in PHP 7.3 and have pulled in the Twig/Symfony composer libraries(
   v3.1.1) which requires PHP >=7.2.5.
 * Every time I try and commit the Twig/Symfony libraries to my plugin’s SVN repository,
   it results in the following:
 *     ```
       svn: E165001: Commit failed (details follow):
       svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:
       ***********************************
       PHP error in: starfish-reviews/tags/2.3.28/composer/vendor/symfony/polyfill-mbstring/bootstrap80.php:
       Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in Standard input code on line 15
       Errors parsing Standard input code
       ***********************************
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/errors-parsing-standard-input-code-bitwise-or/#post-13972395)
 * I think the linter was only updated to 7.1 a couple of months ago.
    I don’t think
   there’s a schedule for updating it.
 *  Thread Starter [Matt](https://wordpress.org/support/users/silvercolt45/)
 * (@silvercolt45)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/errors-parsing-standard-input-code-bitwise-or/#post-13972836)
 * The WordPress Plugins team responded with this. Thank you Team!
 * > That line, and indeed that file, requires PHP 8.0 to work.
   > Now, when you’re running the code normally, in PHP 7.3, then that whole file
   > doesn’t get included. If you look in the bootstrap.php file, you’ll find this
   > code:
   > if (\PHP_VERSION_ID >= 80000) {
   >  return require __DIR__.’/bootstrap80.php’;}
   > That means that it only loads that file in PHP 8 and up.
   > Our linter runs on PHP 7.4, which is what the site itself runs on. But it’s
   > linting each file, it doesn’t actually run your code. So that file can’t pass
   > the lint check, because it’s PHP 8 specific code.
   > The solution for now is simply to downgrade the version of the library you’re
   > using. I’m not familiar enough with composer to tell you the proper way to 
   > do that, but essentially you need to be using the 7.4 compatible version of
   > the symphony-polyfill library.
   > When wordpress.org itself is using PHP 8, then the linter will lint to that,
   > and then PHP 8-only code will be allowed into the directory There is no timeline
   > on that, but it’s likely to happen sometime this year.
 *  [kontur](https://wordpress.org/support/users/kontur/)
 * (@kontur)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/errors-parsing-standard-input-code-bitwise-or/#post-14195831)
 * Why is WP such a tremendously shit platform to develop…
 * Thanks for sharing this “insight” from the WP team.
 *  [Doofinder](https://wordpress.org/support/users/doofinder/)
 * (@doofinder)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/errors-parsing-standard-input-code-bitwise-or/#post-14565689)
 * Hi guys.
 * Instead of downgrading you could just remove type annotations as part as your
   workflow via a sed command.
 * I have a file with replacements and I do this:
 *     ```
       find . -type f -name bootstrap80.php -exec sed -i .bak -f bootstrap80.php.sed {} +
       find . -name "*.bak" -exec rm {} +
       ```
   
 * The sed file looks like:
 *     ```
       s/: bool//g
       s/: string\|false//g
       ```
   
    -  This reply was modified 4 years, 11 months ago by [Doofinder](https://wordpress.org/support/users/doofinder/).
 *  [Eric Teubert](https://wordpress.org/support/users/eteubert/)
 * (@eteubert)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/errors-parsing-standard-input-code-bitwise-or/#post-14792671)
 * For anyone else running into this, the latest unproblematic version of the package
   is 1.20.0. You can fix it in the composer.json:
 *     ```
       {
           "require": {
               "symfony/polyfill-mbstring": "1.20.0",
           },
       }
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Errors parsing Standard input code: Bitwise OR ‘|’’ is closed to new 
replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 5 replies
 * 5 participants
 * Last reply from: [Eric Teubert](https://wordpress.org/support/users/eteubert/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/errors-parsing-standard-input-code-bitwise-or/#post-14792671)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
