What is the problem with this simple code?

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

<?php

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)
http://php.net/manual/en/language.oop5.decon.php

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.