What is the problem with this simple code?

A quick and simple question, what is the problem with the following simple code /


class coucou{
     public $welcome;
     //public $guest = "Mr";
     function _construct($welcome){
     $this->welcome = $welcome; 

$hello = new coucou("this is BBPARIS"); 

echo $hello->welcome;


Thanks for your help.

_construct should be __construct (two underscores)

oh hahahah I didn’t catch it, thank you SO much cpradio !!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.