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

Watheq's avatar
Level 14

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?

0 likes
10 replies
tykus's avatar

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

1 like
Watheq's avatar
Level 14

@tykus I have done what you have written, but the problem remains: no PHP manual.

tykus's avatar
tykus
Best Answer
Level 104

@Watheq so you have a file php_manual.sqlite in a ~/.local/share/psysh/ directory?

Did you restart Tinker?

Are you Mac or Windows?

Watheq's avatar
Level 14

@tykus By and I don't have the file php_manual.sqlite in a ~/.local/share/psysh/ directory

Sinnbeck's avatar

@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 :)

1 like
tykus's avatar

@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
1 like
Watheq's avatar
Level 14

After I downloaded the file php_manual.sqlite, then copied it to the path ~/.local/share/psysh/ it was fixed.

thank you @tykus

tykus's avatar

@Watheq okay; so the cUrl step didn't work previously?

Glad you're all set in any case 👍

Watheq's avatar
Level 14

@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.