- var_export: documentation ( source)
- trim: documentation ( source)
- printf: documentation ( source)
<?php
$vals = ['3 fish', ' +01.0001 ', ' +01.0000000 ', true, false, null, 1e8];
foreach ($vals as $val) {
printf("is %s an int? %s == %s --> %s\n",
var_export($val, true),
var_export((string)(int)$val, true),
var_export(trim($val), true),
var_export((string)(int)$val == trim($val), true)
);
}