Blog Post RSS ?

Blogs » PHP » PHP Manual CLI style
 

PHP Manual CLI style


  • Save to
    Del.icio.us

by Harry Fuecks

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)

This post has 6 responses so far

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

     
  2. heh, that works good scoates :)

     
  3. Wow.. overkill.

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

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

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

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

     

Sponsored Links

Leave a response

You are not logged in, log in with your SitePoint Forum username and password.

-OR- Post Anonymously

* Make sure any code samples are escaped (i.e. ‘<b>’ becomes ‘&lt;b&gt;’).

If not logged in, your comments will be placed in a moderation queue. This means your comment may not appear until one of our moderators approves it.

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Logo Design, Web page Design and more!

99designs

  • Custom logo designs created ‘just for you’.
  • Pick the design you like best.
  • Only pay if you’re satisfied with the result.

Want More Traffic?

Get up to five quotes from qualified SEO specialists, with no obligation!

Get A Free SEO Quote Now!