<?php
// In response to http://www.php.net/manual/en/language.constants.predefined.php#113130
// In fact, you can define magic constants too.
(@__DIR__ == '__DIR__') && define('__DIR__', dirname(__FILE__));
echo "result of var_dump(__DIR__):\r\n";
var_dump(__DIR__);
var_dump(__VERSION__);
result of var_dump(__DIR__):
string(3) "/in"
Fatal error: Uncaught Error: Undefined constant "__VERSION__" in /in/CcWiA:10
Stack trace:
#0 {main}
thrown in /in/CcWiA on line 10
Process exited with code 255.
result of var_dump(__DIR__):
string(3) "/in"
Warning: Use of undefined constant __VERSION__ - assumed '__VERSION__' (this will throw an Error in a future version of PHP) in /in/CcWiA on line 10
string(11) "__VERSION__"
result of var_dump(__DIR__):
string(3) "/in"
Notice: Use of undefined constant __VERSION__ - assumed '__VERSION__' in /in/CcWiA on line 10
string(11) "__VERSION__"