I would like to know what caused this problem that I resolved "sort of without knowing how".
I created the file mysql.php
using the PSPad editor to debug some queries and mysteriously started to look like the error:
Fatal error: Namespace declaration statement has to be the very first statement in the script in C:\localhost\teste\libraries\teste\mysql.php on line 2
In the code there is nothing to denote such an error:
<?php
namespace MysqlTESTE; //utilização de namespaces (CRUD)
include 'server.php';
use Mysqli;
...
I solved the problem by creating a new file mysql.php
in Notepad and pasting the code copied from the file created in PSPad