plugin-php icon indicating copy to clipboard operation
plugin-php copied to clipboard

SyntaxError: Parse Error : syntax error, unexpected '::' (T_DOUBLE_COLON)

Open AnmSaiful opened this issue 2 years ago • 0 comments

A nested static reference is not working.

@prettier/plugin-php v0.19.5

Playground link

Input:

<?php

$app = static::APP::getInstance();


Output:

Parse Error : syntax error, unexpected '::' (T_DOUBLE_COLON) on line 3

  1 | <?php
  2 |
> 3 | $app = static::APP::getInstance();
    |                  ^
  4 |
  5 |

AnmSaiful avatar Jun 09 '23 11:06 AnmSaiful