- function_exists: documentation ( source)
- var_export: documentation ( source)
- json_encode: documentation ( source)
<?php
if(!function_exists('json_encode'))die();
$types = array(
'boolean' => true,
'integer' => 1,
'double' => 2.2,
'NULL' => NULL);
foreach ($types as $key => $type) {
echo "$key: var_export>" . var_export($type, 1) . " json_encode>" . json_encode($type) . "\n";
}