PHP Manual CLI style

Nice one by NuCleuZ: The PHP manual – revisited (discussion).

How about this…


$ phpm in_array
bool in_array ( mixed $needle, array $haystack, [bool $strict] )

Some nice examples of SimpleXml and DOM XPath in action (PHP5 of course)

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • nucleuz

    Released it last night without thinking too much about the end user: will get some proper documentation up later today.

    Also: there will be the possibility to do more general queries – “phpm mysql_*” “phpm -c domdocument” etc.

  • Dangermouse

    heh, that works good scoates :)

  • http://www.phppatterns.com HarryF

    Wow.. overkill.

    Man I hate it when someone kills my overkill ;) – guess Havard is feeling the same.

  • nucleuz

    Some might call it overkill, some don’t know that I have bigger plans for this than just a function param output….. ( just added support for Console_Color at my local machine, uploading soon, much more to come… ), but please: do use grep to figure it out.

    And: the app is also a good example on how the DirectoryItertor, DomDocument, XPath, SimpleXML can work together to create a program.

  • http://blog.phpdoc.info/ scoates

    I had them delete my post because I thought it contained my php.net token (but it didn’t, it turns out.. silly me, lots on my mind).

    So, here it is again, for those of you that are wondering what they’re talking about:


    sean@iconoclast:~/php/cvs/phpdoc$ grep in_array funcsummary.txt
    bool in_array(mixed needle, array haystack [, bool strict])
    sean@iconoclast:~/php/cvs/phpdoc$ grep in_array funcsummary.txt -A1 | xargs
    bool in_array(mixed needle, array haystack [, bool strict]) Checks if the given value exists in the array

    (http://cvs.php.net/co.php/phpdoc/funcsummary.txt?r=1.26)

    S

  • http://blog.phpdoc.info/ scoates

    Nucleuz:

    Sure, I mean what you’re doing is great, and if it evolves into something more, more power to both you, and docbook (note: you may or may not run into problems when we implement the new style for the manual, depending on how and what information you’re planning on grabbing).

    This is a testament to why docbook works, and why it SHOULD be used for projects like phpdoc (and PEARdoc *ahem*).

    S