タグ

phpとjavaに関するmasakielastic2のブックマーク (2)

  • 各言語におけるtrue/falseまとめ - 昼メシ物語

    たとえば PHP で、 if ($hoge) { ... } とか書いてあったら、 $hoge がどんな値のときに if の中身が実行されるのか即答できますか。 こういう書き方は多くの言語で可能ですが、言語によって何が真で何が偽になるのかが異なるので、それぞれまとめてみました。 C言語 C言語には bool 型が無い。 0 (int) だけが偽となり、それ以外はすべて真となる。 NULL 定数は stddef.h で以下のように ((void*)0) と定義されているため、偽値として使える。 意見が分かれそうなところですが、個人的にはNULLを偽値として使用するは好きじゃないです。 #ifndef __cplsuplus #define NULL ((void*)0) #else #define NULL __null #endif C++ C++になると bool 型が出てくる。C と同

    各言語におけるtrue/falseまとめ - 昼メシ物語
  • Home - Jackalope - JCR for PHP - Public Liip Wiki

    A JCR / Jackrabbit client for PHP. The shorter URL for this page is: http://liip.to/jackalope Watch this space for more info very soon. In the meantime, see below and the Links, if you want to be part of it Components The Jackalope Project consists of the following components: The phpCR API Interfaces This interface should be implemented by all projects wanting to provide a JCR interface in PHP. I

  • 1