サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
災害への備え
php100.wordpress.com
I’ve started playing with Ruby recently, and one of the things that got my attention in Ruby were iterators. They are different inside from regular loops but work in a similar way, and looks like people (at least ones that write tutorials and code examples 😉 ) like to use them. For example, you can have: arr = {"one" => 1, "two" => 2, "three" => 3} arr.each do |key, val| print "#{key}: is #{val}\
Since PHP 5.3 now has closures, all things that other languages with closures do should also be possible. One of them is having recursive closures. I.e. something like this: $factorial = function($n) { if ($n <= 1) return 1; else return $n * call_user_func(__FUNCTION__, $n - 1); }; which does not work. One of the ways to do it is to use Y combinator function, which allows, by application of dark m
このページを最初にブックマークしてみませんか?
『PHP 10.0 Blog』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く