Re: Heredocs, print_r() and newline "\n" and fnmatch() -curious failures ...
| From: | YAD(YetAnotherDavid) | Date: | Sat, 09 Oct 2010 09:58:56 +0000 |
| Subject: | Re: Heredocs, print_r() and newline "\n" and fnmatch() -curious failures ... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-308604@lists.php.net to get a copy of this message | ||
Thanks for the response - I found the answer to Q1 - the problem of formatting newlines - I was running the code outputting to browser - and got lazy on some - just pasting the PHP manual examples code directly, without bracketing with HTML tags such as <pre> ... etc. Of course that won't produce the formatting I was expecting and as shown in the manual. What confused me? - some example code includes the <pre> HTML tags and produce formatted output! So, I feel really stupid about that one. Perhaps there is a PHP manual update project in here somewhere to normalize the examples code so they can be run to get the output as printed.
-----------
Q2 re the undefined function - fnmatch() - still needs an explanation. I need to get PHP's fnmatch() function, Xdebug, and iMagick's readImage() function working in the same setup.
Using Xammplite_Win_32_1.7.1, PHP ver 5.2.9 reports fnmatch() is not a defined function and I haven't been able to get Xdebug functioning on this setup. readImage() works just fine.
Using Xammp_Win_32_1.7.3, PHP ver 5.3.1 fnmatch() is defined and Xdebug works 'out of the box' but Apache crashes when iMagick readImage() is called. I think I should communicate this to the extension author. Will post here if I get a result.
Thanks again, Peter.
YAD
Peter Lind wrote:
On 23 September 2010 21:47, YAD(YetAnotherDavid) <animaz@mail.com> wrote:Question 1 : how to get the newline functioning ....? even print_r() output is not 'newlined' as it should be. Also note the \n is missing between the " " in the output text of the second test!Are you outputting to browser or to command line? Browsers have a habit of ignoring whitespaces, reducing them to one whitespace character regardless of their type or how many. Regards Peter