Don't let the comparison between const (in the global context) and define() confuse you: while define() allows expressions as the value, const does not. In that sense it behaves exactly as const (in class context) does.

<?php

// this works/** * Path to the root of the application */define("PATH_ROOT", dirname(__FILE__));