- var_dump: documentation ( source)
- dirname: documentation ( source)
- define: documentation ( source)
<?php
var_dump(defined('__DIR__'));
if (!defined('__DIR__')) {
echo 'ok'."\n";
define('__DIR__', dirname(__FILE__));
} else {
echo 'nok'."\n";
}
echo __DIR__;