I installed PDFlib (followed the instructions PDFlib in PHP How To) on OS X by adding extension=php_pdflib.so to my php.ini file and it is loaded properly.
(If I run phpinfo(); PDFlib is shown in the list.)
However if I try to use it with
$p = new PDFlib();
I get Parse error: syntax error, unexpected '$p' (T_VARIABLE)
What could cause this error?
EDIT
The error was simply caused by a missing semicolon...
Now I am getting a Class 'App\Http\Controllers\PDFlib' not found which is kind of obvious cause I didn't register it in the controller with use.
I thought new PDFlib() is available for global use after installing?