can't get `doc [php function]` inside php artisan tinker
inside php artisan tinker when I write for example:
doc strlen
I get
PHP manual not found
To document core PHP functionality, download the PHP reference manual:
https://github.com/bobthecow/psysh/wiki/PHP-manual
how can I download the manual and it is still with tinker always?
Download one of the following PHP reference manual files and drop it in ~/.local/share/psysh/, /usr/local/share/psysh/ or %APPDATA%\PsySH\ on Windows
So, make a directory and change to it
mkdir -p ~/.local/share/psysh/
cd ~/.local/share/psysh/
Then download the manual
curl -L http://psysh.org/manual/en/php_manual.sqlite --output php_manual.sqlite
Now you will have full man output in the shell
@tykus I have done what you have written, but the problem remains: no PHP manual.
@Watheq so you have a file php_manual.sqlite in a ~/.local/share/psysh/ directory?
Did you restart Tinker?
Are you Mac or Windows?
@tykus
yes I have restarted it..
I am on mac
@tykus By and I don't have the file php_manual.sqlite in a ~/.local/share/psysh/ directory
@Watheq You got the 3 steps on how to add that file earlier.. If those 3 commands ended in an error, it would be good if you said so :)
@Watheq what do you have???
Did you create the directory?
mkdir -p ~/.local/share/psysh/
Did you change into the directory:
cd ~/.local/share/psysh/
Did you execute the cUrl command?
curl -L http://psysh.org/manual/en/php_manual.sqlite --output php_manual.sqlite
After I downloaded the file php_manual.sqlite, then copied it to the path ~/.local/share/psysh/ it was fixed.
thank you @tykus
@Watheq okay; so the cUrl step didn't work previously?
Glad you're all set in any case 👍
@tykus No, I didn't try it. I used wget. It is because I didn't add the php_manual.sqlite file to the psysh.
Please or to participate in this conversation.