Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get php documentation on the console?

Tags:

php

In perl I can use perldoc -i XML::Parser to get the manual on the command line. Is there a similar tool for php?

I can do: php --rf str_repeat, but it doesn't give me much info.

I was able to download html manual here: http://us1.php.net/get/php_manual_en.tar.gz/from/a/mirror. Is it possible to access and search it from the console?

like image 306
Vlad Vinnikov Avatar asked Jun 09 '13 21:06

Vlad Vinnikov


People also ask

How do I log to the console using PHP code?

You can log straight to the console using PHP code in three methods. In a nutshell, we used the json_encode () function and PHP libraries. Let's say you wish to log a PHP variable named $view_variable in your view layer to the console. Console.log () is a JavaScript function, as you may recall.

Which PHP Console library should I use?

If you prefer to use open-source libraries that have solved this issue, there are two options we recommend – PHPDebugConsole (installation instructions and code here) and PHPConsole (installation instructions and code here ). A quick comparison between the two libraries yields the following analysis.

Where can I download the PHP user manual?

The english chm download is also offered with the user notes included. Also, php.net offers a the php manual as man pages, installable via PEAR - it's awesome to integrate into i.e. emacs or vim. In the last years I have switched from chm viewers to Zeal, which provides docsets for several programming languages, including PHP.

How do I know what version of PHP I am running?

the console to report ready, before continueing execution. In *nix systems, use the WHICH command to show the location of the php binary executable. This is the path to use as the first line in your php shell script file. (#!/path/to/php -q) And execute php from the command line with the -v switch to see what version you are running.


1 Answers

From the sidebar at http://php.net/download-docs.php

The manual is also available via *nix style man pages. To install and use:

Install: pear install doc.php.net/pman
Upgrade: pear upgrade doc.php.net/pman
Example usage: pman strlen

like image 115
Gordon Avatar answered Oct 29 '22 17:10

Gordon