Home > AI > Language > PHP >

gettype

<?php
$data = array(1, 1., NULL, new stdClass, 'foo');

foreach ($data as $value) {
    echo gettype($value), "\n";
}

Leave a Reply