- Output for 5.3.0 - 5.3.18, 5.4.0 - 5.4.8
- Fatal error: Namespace declaration statement has to be the very first statement in the script in /in/XOb0H on line 3
Process exited with code 255.
<?php
echo PHP_VERSION;
namespace MyProject {
const CONNECT_OK = 1;
class Connection { static public function start() { echo 'started'; } }
function connect() { /* ... */ }
}
namespace { // global code
session_start();
$a = MyProject\connect();
echo MyProject\Connection::start();
}