- var_dump: documentation ( source)
- defined: documentation ( source)
- array_walk: documentation ( source)
- constant: documentation ( source)
- define: documentation ( source)
<?php
var_dump(hello);
function atom(...$atoms)
{
array_walk(
$atoms,
function ($atom) {
if (defined($atom)) {
if ($atom !== constant($atom)) raise("The atom is already defined with a different value: ".$atom);
} else {
define($atom, $atom);
}
}
);
}
atom(@atom);
atom(@raise);
atom(@dispatch);
atom(@acceptsmessage);
atom(@isatom);
var_dump(@atom);