danog / MadelineProto

Async PHP client API for the telegram MTProto protocol
https://docs.madelineproto.xyz
GNU Affero General Public License v3.0
2.79k stars 633 forks source link

I Can't run a example #260

Closed RyanDevelopering closed 6 years ago

RyanDevelopering commented 6 years ago

Hi! I cant run php script because php return error: PHP Fatal error: Default value for parameters with a class type hint can only be NULL in /var/www/test/vendor/danog/madelineproto/src/Socket.php on line 50

I get a code from example (pipesbot.php) https://github.com/danog/MadelineProto/blob/master/userbots/pipesbot.php

danog commented 6 years ago

MadelineProto supports only PHP 7. Install php 7 or run 7to5 on the repo to run it with php 5.