online 1
gast (50)

/ Forum / Skripte(PHP,ASP,Perl...)

Skripte(PHP,ASP,Perl...)Skripte(PHP,ASP,Perl...)

Fragevon Hoshyman vom 30.03.2019, 16:52 Options

Einfaches Problem bei php.

<?php

function count()
{
	static $count = 0;
	$count++;
	return $count;

}

print $count;

?>


Ergibt bei mir folgende Fehlermeldung:

PHP Fatal error: Cannot redeclare count() in D:\OmniSecure\htdocs\test.php on line 9

Line 9 ist die mit der "}" drin


Antwort schreiben

Antwort 1 von harrrharrr vom 30.03.2019, 17:17 Options

Kannst du mal erklären was das bewirken soll, b.z.w. wo du das her hast? PHP ist das nicht.

Gruß
harrr

Antwort 2 von Supermax vom 30.03.2019, 17:40 Options

Funktionen
count()
und Variablen
$count
dürfen nicht denselben Namen haben.

Antwort 3 von selner vom 30.03.2019, 17:58 Options

print count();

Ähnliche Themen

Problem mit PhP
Firefighter-nb  16.04.2007 - 150 Hits - 1 Antwort

einfaches Schneideprogramm für Musiktitel!
Asd  14.04.2007 - 95 Hits - 1 Antwort

sql problem
claudia20071  29.10.2007 - 78 Hits -

Suche einfaches Programm zum Temperatur Überwachen meines PCs
Steffen25  18.01.2008 - 112 Hits - 1 Antwort

PHP exec() , system(), shell_exec() Problem
matze81992  25.01.2008 - 27 Hits - 2 Antworten

Hinweis

Diese Frage ist schon etwas älter, Sie können daher nicht mehr auf sie antworten. Sollte Ihre Frage noch nicht gelöst sein, stellen Sie einfach eine neue Frage im Forum..

Neue Einträge

Version: supportware 1.9.150 / 10.06.2022, Startzeit:Thu Jan 8 21:07:44 2026