オブジェクト指向言語なのだから当然っちゃ当然。ただPHPerには慣れていないところ。
a = Array.new if a puts "true" else puts "nil" end # >> true
<?php $a = array(); if ($a) { echo "true"; } else { echo "false"; } // >> false
オブジェクト指向言語なのだから当然っちゃ当然。ただPHPerには慣れていないところ。
a = Array.new if a puts "true" else puts "nil" end # >> true
<?php $a = array(); if ($a) { echo "true"; } else { echo "false"; } // >> false