Beendet return eine Funktion?
Robert
- php
Hallo!
ICh weiß natürlich wofür return da ist, nur wollte ich wissen, ob eine Funktion sofort beendet wird wenn return kommt.
Das ist alles.
Danke
Hallo,
ICh weiß natürlich wofür return da ist, nur wollte ich wissen, ob eine Funktion sofort beendet wird wenn return kommt.
Es steht dir frei dieses im Eigenversuch festzustellen.
gruß,
Severin
Hallo Robert,
ICh weiß natürlich wofür return da ist, nur wollte ich
wissen, ob eine Funktion sofort beendet wird wenn return
kommt.
Hach, wofuer so 'ne Doku doch alles gut ist:
return
If called from within a function, the return() statement immediately ends execution of the current function, and returns its argument as the value of the function call. return() will also end the execution of an eval() statement or script file.
If called from the global scope, then execution of the current script file is ended. If the current script file was include()ed or require()ed, then control is passed back to the calling file. Furthermore, if the current script file was include()ed, then the value given to return() will be returned as the value of the include() call. If return() is called from within the main script file, then script execution ends. If the current script file was named by the auto_prepend_file or auto_append_file configuration options in php.ini, then that script file's execution is ended.
Gruesse,
CK
Sup!
If called from within a function, the return() statement immediately ends execution of the current function, and returns its argument as the value of the function call. return() will also end the execution of an eval() statement or script file.
If called from the global scope, then execution of the current script file is ended. If the current script file was include()ed or require()ed, then control is passed back to the calling file. Furthermore, if the current script file was include()ed, then the value given to return() will be returned as the value of the include() call. If return() is called from within the main script file, then script execution ends. If the current script file was named by the auto_prepend_file or auto_append_file configuration options in php.ini, then that script file's execution is ended.
Das ist ja alles ausländisch!
Das kann ja keiner lesen!
Darum ist meine Signatur auch in deutsch ;-)
Gruesse,
Bio
Hallo,
Sup!
If called from within a function, the return() statement immediately ends execution of the current function, and returns its argument as the value of the function call. return() will also end the execution of an eval() statement or script file.
If called from the global scope, then execution of the current script file is ended. If the current script file was include()ed or require()ed, then control is passed back to the calling file. Furthermore, if the current script file was include()ed, then the value given to return() will be returned as the value of the include() call. If return() is called from within the main script file, then script execution ends. If the current script file was named by the auto_prepend_file or auto_append_file configuration options in php.ini, then that script file's execution is ended.
Das ist ja alles ausländisch!
Das kann ja keiner lesen!
Na gut, dann halt so:
Wird die return() Anweisung innerhalb einer Funktion aufgerufen, wird die Ausführung der Funktion sofort beendet und das Argument als Wert des Funktionsaufrufs zurückgegeben. return() beendet auch die Ausführung einer eval() Anweisung oder einer Skriptdatei.
Erfolgt der Aufruf innerhalb des globalen Bereichs, wird die Ausführung des aktuellen Skripts beendet. Wurde das aktuelle Skript include()ed oder require()ed, wird die Kontrolle an das aufrufende Skript zurückgegeben. Wurde das aktuelle Skript include()ed, wird der Wert, der return() zugewiesen wurde, als Wert des Aufrufs von include() zurückgegeben. Wird return() inerhalb des Hauptskripts aufgerufen, wird die Ausführung beendet. Handelt es sich bei dem Skript um eine Datei, die über die Einträge auto_prepend_file oder auto_append_file in der Konfigurationsdatei aufgerufen wurde, wird die Ausführung dieses Skripts beendet.
und wenn das nicht reicht, dann gibt's die ganze Doku noch über http://www.php.net/docs.php in folgenden Sprachen:
English, Brazilian Portuguese, Chinese (Simplified), Chinese (Hong Kong Cantonese), Chinese (Traditional), Czech, Dutch, Finnish, French, [Special French], German, Hebrew, Hungarian, Italian, Japanese, Korean, Polish, Romanian, Russian, Slovak, Slovenian, Spanish, Swedish, Turkish
Mia geht zwoa nou des stairische o, oba des bissl auslendisch kaun grod no, dass i die wichtigen sochn in ana passenden sproch aussadafind. *g*
Grüße
Klaus
n'abends,
Mia geht zwoa nou des stairische o, oba des bissl auslendisch kaun grod no, dass i die wichtigen sochn in ana passenden sproch aussadafind. *g*
Muß ich mir zur Übersetzung dafür noch irgendein Sprachpaket installieren - Chinesisch oder Sanskrit oder sowas?
Grüße aus Berlin
Christoph S.
Hallo Christoph,
Mia geht zwoa nou des stairische o, oba des bissl auslendisch kaun grod no, dass i die wichtigen sochn in ana passenden sproch aussadafind. *g*
Muß ich mir zur Übersetzung dafür noch irgendein Sprachpaket installieren - Chinesisch oder Sanskrit oder sowas?
Das eine oder andere Buch ('Der Hödlmoser' vielleicht) von Reinhard P. Gruber tut's auch;-)
Grüße
Klaus
Hio Bio,
deine Signatur ist auch in deutsch keinesfalls nachahmenswert :D
Übrigens, ich war weder auf der Hauptschule, noch pubertiere ich gerade, programmiere trotzdem PHP. :P
gruss
Thorsten
hi,
Übrigens, ich war weder auf der Hauptschule, noch pubertiere ich gerade, programmiere trotzdem PHP. :P
Das gilt nicht, du betreibst Wettbewerbsverzerrung und mußt jetzt Wettbewerbsverzerrungssteuer zahlen.
Grüße aus Berlin
Christoph S.
Hallo Christoph,
Übrigens, ich war weder auf der Hauptschule, noch
pubertiere ich gerade, programmiere trotzdem PHP. :P
Das gilt nicht, du betreibst Wettbewerbsverzerrung und
mußt jetzt Wettbewerbsverzerrungssteuer zahlen.
Hier ist meine Konto-Verbindung:
Christian Kruse
GanzGrosseBank
BLZ: 2094323049
Kto.-Nr.: 382942938
Gruesse,
CK
morgens CK ;-)
Hier ist meine Konto-Verbindung:
ähm, ja. Ohne deine PIN kann ich natürlich nichts anderes machen, als diese Nummern jetzt an meinen Kontaktmann bei der Nigeria-Connection zwecks Überprüfung weiterzuleiten.
Grüße aus heiterem Berliner Morgen
Christoph S.
If called from within a function, the return() statement immediately ends execution of the current function, and returns its argument as the value of the function call
Danke vielmals CK