例
<?php $data = array(1, 1., NULL, new stdClass, 'foo'); foreach ($data as $value) { echo gettype($value) . PHP_EOL; }
結果
integer
double
NULL
object
string
<?php $data = array(1, 1., NULL, new stdClass, 'foo'); foreach ($data as $value) { echo gettype($value) . PHP_EOL; }
integer
double
NULL
object
string