Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

haneefansari's avatar

PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /volunteers/artisan on line 30

I want to fire email when user registered, i used laravel database queue and also i added CRON job command. But currently its not firing the job. i checked error_log in laravel app folder. [09-Apr-2018 12:18:02 America/Chicago] PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home3/abc/volunteers/artisan on line 30

PHP Version 7.1.4

Laravel Version 5.6.7

0 likes
2 replies
Cronix's avatar

Check your job code. You have a syntax error in it, so Artisan can't process it.

Snapey's avatar
Snapey
Best Answer
Level 122

My suspicion is that CRON is running an old PHP version

1 like

Please or to participate in this conversation.