<?php
class test{
function showMess()
{
echo 'this is a test';
}
}
$t = test;
//var_dump($t);
$t = new test;
//var_dump($t,$t->showMess);
var_dump($t->showMess());
var_dump('have a nice day');
Fatal error: Uncaught Error: Undefined constant "test" in /in/b1qBJ:8
Stack trace:
#0 {main}
thrown in /in/b1qBJ on line 8
Process exited with code 255.
Warning: Use of undefined constant test - assumed 'test' (this will throw an Error in a future version of PHP) in /in/b1qBJ on line 8
this is a testNULL
string(15) "have a nice day"