What does this mean? “Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM”

前端 未结 8 1606
囚心锁ツ
囚心锁ツ 2020-11-28 09:34

T_PAAMAYIM_NEKUDOTAYIM sounds really exotic, but most certainly absolutely nonsense to me. I traced it all down to this lines of code:



        
相关标签:
8条回答
  • 2020-11-28 10:26

    if you still need to use the double-colon then make sure your on PHP 5.3+

    0 讨论(0)
  • 2020-11-28 10:27

    For anyone using Laravel. I was having the same error on Laravel 7.0. The error looked like this

    syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM), expecting ';' or ','
    

    It was in my Routes\web.php file, which looked like this

    use Illuminate\Support\Facades\Route;
    use Illuminate\Http\Request;
    use // this was an extra **use** statement that gave me the error
    
    Route::get('/', function () {
        return view('save-online.index');
    })->name('save-online.index');
    
    0 讨论(0)
提交回复
热议问题