FriendsOfPHP / Goutte

Goutte, a simple PHP Web Scraper
MIT License
9.26k stars 1.01k forks source link

Unexpected ? error in Symfony Browser Kit on line 632 #395

Closed goldhat closed 4 years ago

goldhat commented 4 years ago

After fresh install (on PHP7.0.10) I got the error below, maybe that version doesn't work for PHP7.x?

( ! ) Parse error: syntax error, unexpected '?' in C:\wamp64\www\lima\vendor\symfony\browser-kit\Client.php on line 632

larowlan commented 4 years ago

Php 7.0 (and 7.1) are end of life.

7.1 introduced nullable types - e.g.

function foo(?bar $whiz): ?bar

I think that's your issue - you need a supported version of php