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 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:00 CET] peter
Line 10: Line 10:
  
   <?   <?
 +    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 48:
     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 80:
     else               print '| not empty ' ;     else               print '| not empty ' ;
     print "|\n";     print "|\n";
 +  
 +    print '+---------------';
 +    print '+-----------' ;
 +    print '+-----------' ;
 +    print "+\n";
 +
  
 gives  gives 
  
 +  +---------------+-----------+-----------+
 +  | value         | isset()   | empty()   |
 +  +---------------+-----------+-----------+
   | $foobar       | not set   | empty     |   | $foobar       | not set   | empty     |
   | $foobar = 0   | set       | empty     |   | $foobar = 0   | set       | empty     |
Line 76: Line 99:
   | $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