This question already has an answer here:
I get an error on my class
[31-Dec-2016 20:05:53 Africa/Casablanca] PHP Parse error: syntax error, unexpected 'Private' (T_PRIVATE), expecting identifier (T_STRING) in /home/address/main.php on line 5
Haven't added anything to the class yet
<?php
class Modeladdonmain extends Hand {
public function Private() {
}
public function Poke() {
}
public function Whisper() {
}
}
?>
</div>
Your function Private()
contains special word private
which is used for declaring members, etc.
Any other similar name would solve your issue. For example, instead of Private()
you can use something like privateFunction()
(if you're ok with that name).
Similarly, you can't use names like Protected()
or Public()
.