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?
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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With