Anda di halaman 1dari 5

PHP: Separacin de instrucciones - Manual

http://php.net/manual/es/language.basic-syntax....

Downloads
Documentation
Get Involved
Help

Search
PHPKonf: Istanbul PHP Conference 2017
Getting Started
Introduction
A simple tutorial
Language Reference
Basic syntax
Types
Variables
Constants
Expressions
Operators
Control Structures
Functions
Classes and Objects
Namespaces
Errors
Exceptions
Generators
References Explained
Predefined Variables
Predefined Exceptions
Predefined Interfaces and Classes
Context options and parameters
Supported Protocols and Wrappers
Security
Introduction
General considerations
Installed as CGI binary
Installed as an Apache module
Session Security
Filesystem Security
Database Security
Error Reporting
Using Register Globals
User Submitted Data
Magic Quotes
Hiding PHP
Keeping Current
1 de 5

14/01/17 10:39

PHP: Separacin de instrucciones - Manual

http://php.net/manual/es/language.basic-syntax....

Features
HTTP authentication with PHP
Cookies
Sessions
Dealing with XForms
Handling file uploads
Using remote files
Connection handling
Persistent Database Connections
Safe Mode
Command line usage
Garbage Collection
DTrace Dynamic Tracing
Function Reference
Affecting PHP's Behaviour
Audio Formats Manipulation
Authentication Services
Command Line Specific Extensions
Compression and Archive Extensions
Credit Card Processing
Cryptography Extensions
Database Extensions
Date and Time Related Extensions
File System Related Extensions
Human Language and Character Encoding Support
Image Processing and Generation
Mail Related Extensions
Mathematical Extensions
Non-Text MIME Output
Process Control Extensions
Other Basic Extensions
Other Services
Search Engine Extensions
Server Specific Extensions
Session Extensions
Text Processing
Variable and Type Related Extensions
Web Services
Windows Only Extensions
XML Manipulation
GUI Extensions
Keyboard Shortcuts
?
This help
j
Next menu item
k
Previous menu item
gp
2 de 5

14/01/17 10:39

PHP: Separacin de instrucciones - Manual

http://php.net/manual/es/language.basic-syntax....

Previous man page


gn
Next man page
G
Scroll to bottom
gg
Scroll to top
gh
Goto homepage
gs
Goto search
(current page)
/
Focus search box
Comentarios
Salir de HTML
Manual de PHP
Referencia del lenguaje
Sintaxis bsica
Change language:

Spanish

Edit Report a Bug

Separacin de instrucciones
Como en C o en Perl, PHP requiere que las instrucciones terminen en punto y
coma al final de cada sentencia. La etiqueta de cierre de un bloque de cdigo
de PHP automticamente implica un punto y coma; no es necesario usar un
punto y coma para cerrar la ltima lnea de un bloque de PHP. La etiqueta de
cierre del bloque incluir la nueva lnea final inmediata si est presente.
<?php
echo'Estoesunaprueba';
?>
<?phpecho'Estoesunaprueba'?>
<?phpecho'Hemosomitidolaltimaetiquetadecierre';

Nota:
La etiqueta de cierre de un bloque de PHP es opcional al final de
un fichero, y en algunos casos es til omitirla cuando se usa include
o require, para que no se produzcan espacios en blanco al final de
los ficheros, pudindose an aadir as cabeceras para la respuesta
posterior. Tambin es prctico si se utiliza la salida del buffer y no

3 de 5

14/01/17 10:39

PHP: Separacin de instrucciones - Manual

http://php.net/manual/es/language.basic-syntax....

se desean espacios en blanco no deseados al final de las partes


generadas por ficheros includos.
add a note

User Contributed Notes 3 notes


up
down
156
Krishna Srikanth
10 years ago
Do not mis interpret
<?php echo 'Ending tag excluded';
with
<?php echo 'Ending tag excluded';
<p>But html is still visible</p>
The second one would give error. Exclude ?> if you no more html to write after the
code.

up
down
-20
Kalimuthu
2 years ago

up
down

4 de 5

14/01/17 10:39

PHP: Separacin de instrucciones - Manual

http://php.net/manual/es/language.basic-syntax....

-44
pbarney
5 years ago
If you want to keep the newline after a closing tag in the output, just add a space
after the closing tag, and the newline will not be ignored.

add a note

Sintaxis bsica
Etiquetas de PHP
Salir de HTML
Separacin de instrucciones
Comentarios
Copyright 2001-2017 The PHP Group
My PHP.net
Contact
Other PHP.net sites
Mirror sites
Privacy policy

5 de 5

14/01/17 10:39

Anda mungkin juga menyukai