タグ

javascriptとPHPに関するdeeekiのブックマーク (2)

  • JSONに関しては、例えば、PHPを避ける | 配電盤

    ここで紹介している問題は、PHP 5.4で解決されました。 JavaScriptのための記法であるJSONですが、最近はさまざまなプログラミング言語でサポートされています。たとえば、PHP 5には、JSON文字列をオブジェクトに変換するための関数、json_decode()が用意されています。 <?php var_dump(json_decode('{"id":12345}')); &#91;/php&#93; <p>この実装はなかなか親切で、<a href="http://codepad.org/XT2fs3S5">実行結果</a>を見るとわかるように、データが数値なら、数値として取り出してくれます。</p> <p>しかし、最近ではTwitterのつぶやきのIDがintの範囲を超えたりしているので、ちょっと不安です。下の例では、$idaと$idbの値は異なることが期待されますが、<a h

    JSONに関しては、例えば、PHPを避ける | 配電盤
  • We are Locutus

    All your standard libraries will be assimilated into our JavaScript collective. Resistance is futile. Welcome to Locutus, where the boundaries of coding languages blur. We’re a dedicated collective developers on a mission to explore the possibilities of porting standard libraries from various programming language (Go, Ruby, PHP, C) to JavaScript. Our journey is one of discovery, innovation, and so

  • 1