From 0599b66cc0bd75ca01fc68fa4b7c4ddbe16e341d Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 8 Dec 2003 13:52:47 +0000 Subject: [PATCH] Changed print to echo as recommended in RFC/coding_standards git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@145979 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/list.xml | 6 ++-- reference/bzip2/functions/bzcompress.xml | 4 +-- reference/bzip2/functions/bzdecompress.xml | 14 ++++---- reference/bzip2/functions/bzopen.xml | 8 ++--- reference/bzip2/functions/bzread.xml | 4 +-- reference/datetime/functions/strftime.xml | 34 +++++++++---------- reference/dbx/functions/dbx-close.xml | 4 +-- reference/fbsql/functions/fbsql-create-db.xml | 4 +-- .../imap/functions/imap-createmailbox.xml | 14 ++++---- reference/imap/functions/imap-status.xml | 14 ++++---- reference/pgsql/functions/pg-close.xml | 4 +-- reference/pgsql/functions/pg-get-notify.xml | 4 +-- reference/xslt/functions/xslt-error.xml | 4 +-- reference/xslt/functions/xslt-set-log.xml | 12 +++---- 14 files changed, 65 insertions(+), 65 deletions(-) diff --git a/reference/array/functions/list.xml b/reference/array/functions/list.xml index 0409c53f14..68ff8c079b 100644 --- a/reference/array/functions/list.xml +++ b/reference/array/functions/list.xml @@ -1,5 +1,5 @@ - + @@ -66,10 +66,10 @@ print "I need $power!\n"; $result = mysql_query("SELECT id, name, salary FROM employees",$conn); while (list($id, $name, $salary) = mysql_fetch_row($result)) { - print(" \n" . + echo " \n" . " $name\n" . " $salary\n" . - " \n"); + " \n"; } ?> diff --git a/reference/bzip2/functions/bzcompress.xml b/reference/bzip2/functions/bzcompress.xml index a854cd35f9..b1b246728c 100644 --- a/reference/bzip2/functions/bzcompress.xml +++ b/reference/bzip2/functions/bzcompress.xml @@ -1,5 +1,5 @@ - + @@ -42,7 +42,7 @@ ]]> diff --git a/reference/bzip2/functions/bzdecompress.xml b/reference/bzip2/functions/bzdecompress.xml index 2adfa74325..42543cd9ff 100644 --- a/reference/bzip2/functions/bzdecompress.xml +++ b/reference/bzip2/functions/bzdecompress.xml @@ -1,5 +1,5 @@ - + @@ -32,14 +32,14 @@ $start_str = "This is not an honest face?"; $bzstr = bzcompress($start_str); -print( "Compressed String: " ); -print( $bzstr ); -print( "\n
\n" ); +echo "Compressed String: "; +echo $bzstr; +echo "\n
\n"; $str = bzdecompress($bzstr); -print( "Decompressed String: " ); -print( $str ); -print( "\n
\n" ); +echo "Decompressed String: "; +echo $str; +echo "\n
\n"; ?> ]]> diff --git a/reference/bzip2/functions/bzopen.xml b/reference/bzip2/functions/bzopen.xml index a1d291c0f8..5cb8e6cd15 100644 --- a/reference/bzip2/functions/bzopen.xml +++ b/reference/bzip2/functions/bzopen.xml @@ -1,5 +1,5 @@ - + @@ -37,9 +37,9 @@ while (!feof($bz)) { } bzclose($bz); -print( "The contents of /tmp/foo.bz2 are: " ); -print( "\n
\n" ); -print( $decompressed_file ); +echo "The contents of /tmp/foo.bz2 are: "; +echo "\n
\n"; +echo $decompressed_file; ?> ]]> diff --git a/reference/bzip2/functions/bzread.xml b/reference/bzip2/functions/bzread.xml index 5e0a235202..8dd95dc044 100644 --- a/reference/bzip2/functions/bzread.xml +++ b/reference/bzip2/functions/bzread.xml @@ -1,5 +1,5 @@ - + @@ -31,7 +31,7 @@ ]]> diff --git a/reference/datetime/functions/strftime.xml b/reference/datetime/functions/strftime.xml index 2c55b1ad9a..67736e7107 100644 --- a/reference/datetime/functions/strftime.xml +++ b/reference/datetime/functions/strftime.xml @@ -1,5 +1,5 @@ - + @@ -252,14 +252,14 @@ ]]> @@ -288,16 +288,16 @@ ISOWk M Tu W Thu F Sa Su 3 13 14 15 16 17 18 19 */ // Outputs: 12/28/2002 - %V,%G,%Y = 52,2002,2002 -print "12/28/2002 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/28/2002")) . "\n"; +echo "12/28/2002 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/28/2002")) . "\n"; // Outputs: 12/30/2002 - %V,%G,%Y = 1,2003,2002 -print "12/30/2002 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/30/2002")) . "\n"; +echo "12/30/2002 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/30/2002")) . "\n"; // Outputs: 1/3/2003 - %V,%G,%Y = 1,2003,2003 -print "1/3/2003 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/3/2003")) . "\n"; +echo "1/3/2003 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/3/2003")) . "\n"; // Outputs: 1/10/2003 - %V,%G,%Y = 2,2003,2003 -print "1/10/2003 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/10/2003")) . "\n"; +echo "1/10/2003 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/10/2003")) . "\n"; @@ -311,16 +311,16 @@ ISOWk M Tu W Thu F Sa Su 2 10 11 12 13 14 15 16 */ // Outputs: 12/23/2004 - %V,%G,%Y = 52,2004,2004 -print "12/23/2004 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/23/2004")) . "\n"; +echo "12/23/2004 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/23/2004")) . "\n"; // Outputs: 12/31/2004 - %V,%G,%Y = 53,2004,2004 -print "12/31/2004 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/31/2004")) . "\n"; +echo "12/31/2004 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/31/2004")) . "\n"; // Outputs: 1/2/2005 - %V,%G,%Y = 53,2004,2005 -print "1/2/2005 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/2/2005")) . "\n"; +echo "1/2/2005 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/2/2005")) . "\n"; // Outputs: 1/3/2005 - %V,%G,%Y = 1,2005,2005 -print "1/3/2005 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/3/2005")) . "\n"; +echo "1/3/2005 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/3/2005")) . "\n"; ?> ]]> diff --git a/reference/dbx/functions/dbx-close.xml b/reference/dbx/functions/dbx-close.xml index 3ed3874922..3b36e4c956 100644 --- a/reference/dbx/functions/dbx-close.xml +++ b/reference/dbx/functions/dbx-close.xml @@ -1,5 +1,5 @@ - + @@ -23,7 +23,7 @@ $link = dbx_connect(DBX_MYSQL, "localhost", "db", "username", "password") or die ("Could not connect"); -print("Connected successfully"); +echo "Connected successfully"; dbx_close($link); ?> ]]> diff --git a/reference/fbsql/functions/fbsql-create-db.xml b/reference/fbsql/functions/fbsql-create-db.xml index 42c9a30ab4..4edb65cd56 100644 --- a/reference/fbsql/functions/fbsql-create-db.xml +++ b/reference/fbsql/functions/fbsql-create-db.xml @@ -1,5 +1,5 @@ - + @@ -29,7 +29,7 @@ $link = fbsql_pconnect ("localhost", "_SYSTEM", "secret") or die ("Could not connect"); if (fbsql_create_db ("my_db")) { - print("Database created successfully\n"); + echo "Database created successfully\n"; } else { printf("Error creating database: %s\n", fbsql_error ()); } diff --git a/reference/imap/functions/imap-createmailbox.xml b/reference/imap/functions/imap-createmailbox.xml index ab82362180..66e0493587 100644 --- a/reference/imap/functions/imap-createmailbox.xml +++ b/reference/imap/functions/imap-createmailbox.xml @@ -1,5 +1,5 @@ - + @@ -49,12 +49,12 @@ echo "Newname will be '$name1'
\n"; if(@imap_createmailbox($mbox,imap_utf7_encode("{your.imap.host}INBOX.$newname"))) { $status = @imap_status($mbox,"{your.imap.host}INBOX.$newname",SA_ALL); if($status) { - print("your new mailbox '$name1' has the following status:
\n"); - print("Messages: ". $status->messages )."
\n"; - print("Recent: ". $status->recent )."
\n"; - print("Unseen: ". $status->unseen )."
\n"; - print("UIDnext: ". $status->uidnext )."
\n"; - print("UIDvalidity:". $status->uidvalidity)."
\n"; + echo "your new mailbox '$name1' has the following status:
\n"; + echo "Messages: ". $status->messages ."
\n"; + echo "Recent: ". $status->recent ."
\n"; + echo "Unseen: ". $status->unseen ."
\n"; + echo "UIDnext: ". $status->uidnext ."
\n"; + echo "UIDvalidity:". $status->uidvalidity ."
\n"; if(imap_renamemailbox($mbox,"{your.imap.host}INBOX.$newname","{your.imap.host}INBOX.$name2")) { echo "renamed new mailbox from '$name1' to '$name2'
\n"; diff --git a/reference/imap/functions/imap-status.xml b/reference/imap/functions/imap-status.xml index d32abd292b..1b8eb7e1c8 100644 --- a/reference/imap/functions/imap-status.xml +++ b/reference/imap/functions/imap-status.xml @@ -1,5 +1,5 @@ - + @@ -73,13 +73,13 @@ $mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN) $status = imap_status($mbox,"{your.imap.host}INBOX",SA_ALL); if($status) { - print("Messages: ". $status->messages )."
\n"; - print("Recent: ". $status->recent )."
\n"; - print("Unseen: ". $status->unseen )."
\n"; - print("UIDnext: ". $status->uidnext )."
\n"; - print("UIDvalidity:". $status->uidvalidity)."
\n"; + echo "Messages: ". $status->messages ."
\n"; + echo "Recent: ". $status->recent ."
\n"; + echo "Unseen: ". $status->unseen ."
\n"; + echo "UIDnext: ". $status->uidnext ."
\n"; + echo "UIDvalidity:". $status->uidvalidity ."
\n"; } else - print "imap_status failed: ".imap_last_error()."\n"; + echo "imap_status failed: ".imap_last_error()."\n"; imap_close($mbox); ?> diff --git a/reference/pgsql/functions/pg-close.xml b/reference/pgsql/functions/pg-close.xml index e6dafd830a..51601b32a6 100644 --- a/reference/pgsql/functions/pg-close.xml +++ b/reference/pgsql/functions/pg-close.xml @@ -1,5 +1,5 @@ - + @@ -32,7 +32,7 @@ ]]> diff --git a/reference/pgsql/functions/pg-get-notify.xml b/reference/pgsql/functions/pg-get-notify.xml index 322a65f77e..f2a6b97d35 100644 --- a/reference/pgsql/functions/pg-get-notify.xml +++ b/reference/pgsql/functions/pg-get-notify.xml @@ -1,5 +1,5 @@ - + pg_get_notify @@ -39,7 +39,7 @@ if (!$conn) { pg_query($conn, 'LISTEN author_updated;'); $notify = pg_get_notify($conn); if (!$notify) - print("No messages\n"); + echo "No messages\n"; else print_r($notify); ?> diff --git a/reference/xslt/functions/xslt-error.xml b/reference/xslt/functions/xslt-error.xml index 77c5bc4221..081eaaefc6 100644 --- a/reference/xslt/functions/xslt-error.xml +++ b/reference/xslt/functions/xslt-error.xml @@ -1,5 +1,5 @@ - + @@ -33,7 +33,7 @@ if (!$result) { xslt_errno($xh), xslt_error($xh))); } -print($result); +echo $result; xslt_free($xh); ?> diff --git a/reference/xslt/functions/xslt-set-log.xml b/reference/xslt/functions/xslt-set-log.xml index 892d1c2778..a3d34dfea2 100644 --- a/reference/xslt/functions/xslt-set-log.xml +++ b/reference/xslt/functions/xslt-set-log.xml @@ -1,5 +1,5 @@ - + @@ -57,7 +57,7 @@ xslt_set_log($xh, true); xslt_set_log($xh, getcwd() . 'myfile.log'); $result = xslt_process($xh, 'dog.xml', 'pets.xsl'); -print($result); +echo $result; xslt_free($xh); ?> @@ -65,10 +65,10 @@ xslt_free($xh); - - - Please note that file:// is needed in front of path if you use Windows. - + + + Please note that file:// is needed in front of path if you use Windows. +