User Tools

Site Tools


docs:tips_n_tricks:php.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
docs:tips_n_tricks:php.html [08.03.2012 09:53 CET] peterdocs:tips_n_tricks:php.html [08.03.2012 10:04 CET] peter
Line 10: Line 10:
  
   <?   <?
 +    print "PHP Version is ".phpversion()."\n";
 +  
 +    print '+---------------';
 +    print '+-----------' ;
 +    print '+-----------' ;
 +    print "+\n";
 +  
 +    print '| value         ';
 +    print '| isset()   ' ;
 +    print '| empty()   ' ;
 +    print "|\n";
 +  
 +    print '+---------------';
 +    print '+-----------' ;
 +    print '+-----------' ;
 +    print "+\n";
      
     print '| $foobar       ';     print '| $foobar       ';
Line 34: Line 50:
     else               print '| not empty ' ;     else               print '| not empty ' ;
     print "|\n";     print "|\n";
 +  
     print '| $foobar = 42  ';     print '| $foobar = 42  ';
     $foobar = 42;     $foobar = 42;
Line 66: Line 82:
     else               print '| not empty ' ;     else               print '| not empty ' ;
     print "|\n";     print "|\n";
 +  
 +    print '+---------------';
 +    print '+-----------' ;
 +    print '+-----------' ;
 +    print "+\n";
 +
  
 gives  gives 
  
 +  PHP Version is 5.3.8
 +  +---------------+-----------+-----------+
 +  | value         | isset()   | empty()   |
 +  +---------------+-----------+-----------+
   | $foobar       | not set   | empty     |   | $foobar       | not set   | empty     |
   | $foobar = 0   | set       | empty     |   | $foobar = 0   | set       | empty     |
Line 76: Line 102:
   | $foobar = "x" | set       | not empty |   | $foobar = "x" | set       | not empty |
   | $foobar = NULL| not set   | empty     |   | $foobar = NULL| not set   | empty     |
 +  +---------------+-----------+-----------+
 +
  
docs/tips_n_tricks/php.html.txt · Last modified: 08.03.2012 10:23 CET by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki