Connecting Tech Pros Worldwide Forums | Help | Site Map

.php5 versus .php

McKirahan
Guest
 
Posts: n/a
#1: Feb 15 '07
I am working in two environments neither configuration of
which I can change; one's my Web host the other a client.

My Web host requires the use of the ".php5" extension
to use PHP v5.1.4; where ".php" is used for PHP v4.3.11.
My client supports PHP v5.2.0 with the ".php" extension.

Is there a way to reliably determine if the ".php5" extension
must be used on a server? Perhaps via a "phpinfo()" value?

I have a page that uses the v5 function "file_put_contents()".
(I like it's LOCK_EX feature.)

Thanks in advance.





McKirahan
Guest
 
Posts: n/a
#2: Feb 15 '07

re: .php5 versus .php


"McKirahan" <News@McKirahan.comwrote in message
news:dO6dnRHVOfLPGknYnZ2dnUVZ_uy3nZ2d@comcast.com. ..
Quote:
I am working in two environments neither configuration of
which I can change; one's my Web host the other a client.
>
My Web host requires the use of the ".php5" extension
to use PHP v5.1.4; where ".php" is used for PHP v4.3.11.
My client supports PHP v5.2.0 with the ".php" extension.
>
Is there a way to reliably determine if the ".php5" extension
must be used on a server? Perhaps via a "phpinfo()" value?
>
I have a page that uses the v5 function "file_put_contents()".
(I like it's LOCK_EX feature.)
>
Thanks in advance.

I tried this (to not write to the file in the function isn't supported):

try {
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);
} catch (Exception $e) {
echo "Caught exception: ", $e->getMessage(), "\n";
}

but got this error:

Parse error: parse error, unexpected '{' ...

It doesn't like my use of "try - catch".
Why isn't "try - catch" documented?
I found only one reference; (under "Exceptions").


Rik
Guest
 
Posts: n/a
#3: Feb 15 '07

re: .php5 versus .php


On Thu, 15 Feb 2007 18:12:30 +0100, McKirahan <News@McKirahan.comwrote:
Quote:
Quote:
>Is there a way to reliably determine if the ".php5" extension
>must be used on a server? Perhaps via a "phpinfo()" value?
>>
I tried this (to not write to the file in the function isn't supported):
>
try {
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);
} catch (Exception $e) {
echo "Caught exception: ", $e->getMessage(), "\n";
}
>
but got this error:
>
Parse error: parse error, unexpected '{' ...
>
It doesn't like my use of "try - catch".
Why isn't "try - catch" documented?
I found only one reference; (under "Exceptions").
try - catch is only usefull for Exceptions, and hence that's where they're
found. Also, Exceptions are introduced in PHP5, so that's no way to fall
back to PHP4.

Usefull for determening current PHP / newer functionality:
<http://www.php.net/phpversion>
<http://pear.php.net/package/PHP_Compat>

Now, I have no idea how to find out the addtype declarations in apaches
configuration with PHP, but this cumbersome workaround will probably work:

----checktype.php5--
echo PHP_VERSION;
--------------------

---check.php--------
echo "Current .php version is ".PHP_VERSION."\n";
$path = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/';
$php5 = file_get_contents($path.'checktype.php5');
if(preg_match('/^<\?/',$php5)){
echo ".php5 is not supported as an extention";
} else {
echo ".php5 uses version ".$php5;
$result = version_compare(PHP_VERSION,$php5);
if($result == 0){
echo "\nversions are equal";
} else {
echo "\nversion used for .php5 is ".(($result==-1)?'higher':'lower');
}
}
--------------------

--
Rik Wasmus
Kimmo Laine
Guest
 
Posts: n/a
#4: Feb 15 '07

re: .php5 versus .php


McKirahan kirjoitti:
Quote:
"McKirahan" <News@McKirahan.comwrote in message
news:dO6dnRHVOfLPGknYnZ2dnUVZ_uy3nZ2d@comcast.com. ..
Quote:
>I am working in two environments neither configuration of
>which I can change; one's my Web host the other a client.
>>
>My Web host requires the use of the ".php5" extension
>to use PHP v5.1.4; where ".php" is used for PHP v4.3.11.
>My client supports PHP v5.2.0 with the ".php" extension.
>>
>Is there a way to reliably determine if the ".php5" extension
>must be used on a server? Perhaps via a "phpinfo()" value?
>>
>I have a page that uses the v5 function "file_put_contents()".
>(I like it's LOCK_EX feature.)
>>
>Thanks in advance.
>
>
I tried this (to not write to the file in the function isn't supported):
>
try {
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);
} catch (Exception $e) {
echo "Caught exception: ", $e->getMessage(), "\n";
}
>
but got this error:
>
Parse error: parse error, unexpected '{' ...
>
It doesn't like my use of "try - catch".
Why isn't "try - catch" documented?
I found only one reference; (under "Exceptions").
>
>
Don't know if these help you any but two observations:

1) you can get the version of php with phpversion();
http://fi.php.net/manual/en/function.phpversion.php

2) You can test wether a function exists with

if(function_exists('file_put_contents')){
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);
} else {
echo "craptastic!";
}


--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
shimmyshack
Guest
 
Posts: n/a
#5: Feb 15 '07

re: .php5 versus .php


On Feb 15, 6:05 pm, Kimmo Laine <s...@outolempi.netwrote:
Quote:
McKirahan kirjoitti:
>
>
>
Quote:
"McKirahan" <N...@McKirahan.comwrote in message
news:dO6dnRHVOfLPGknYnZ2dnUVZ_uy3nZ2d@comcast.com. ..
Quote:
I am working in two environments neither configuration of
which I can change; one's my Web host the other a client.
>
Quote:
Quote:
My Web host requires the use of the ".php5" extension
to use PHP v5.1.4; where ".php" is used for PHP v4.3.11.
My client supports PHP v5.2.0 with the ".php" extension.
>
Quote:
Quote:
Is there a way to reliably determine if the ".php5" extension
must be used on a server? Perhaps via a "phpinfo()" value?
>
Quote:
Quote:
I have a page that uses the v5 function "file_put_contents()".
(I like it's LOCK_EX feature.)
>
Quote:
Quote:
Thanks in advance.
>
Quote:
I tried this (to not write to the file in the function isn't supported):
>
Quote:
try {
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);
} catch (Exception $e) {
echo "Caught exception: ", $e->getMessage(), "\n";
}
>
Quote:
but got this error:
>
Quote:
Parse error: parse error, unexpected '{' ...
>
Quote:
It doesn't like my use of "try - catch".
Why isn't "try - catch" documented?
I found only one reference; (under "Exceptions").
>
Don't know if these help you any but two observations:
>
1) you can get the version of php with phpversion();http://fi.php.net/manual/en/function.phpversion.php
>
2) You can test wether a function exists with
>
if(function_exists('file_put_contents')){
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);} else {
>
echo "craptastic!";
>
}
>
--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
s...@outolempi.net | Gedoon-S @ IRCnet | rot13(x...@bhgbyrzcv.arg)
also your code had a typo in it:

try
{
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);
}
catch (Exception $e)
{
echo "Caught exception: ". $e->getMessage(), "\n";
} |
__________________________|
(should have been a dot after caught exception)

as for .php5, just use an .htaccess file to rewrite all extensions of
one sort to the other, whatever suits. 1and1 are like this, but the
htaccess rewrite rules work fine.

shimmyshack
Guest
 
Posts: n/a
#6: Feb 15 '07

re: .php5 versus .php


On Feb 15, 6:05 pm, Kimmo Laine <s...@outolempi.netwrote:
Quote:
McKirahan kirjoitti:
>
>
>
Quote:
"McKirahan" <N...@McKirahan.comwrote in message
news:dO6dnRHVOfLPGknYnZ2dnUVZ_uy3nZ2d@comcast.com. ..
Quote:
I am working in two environments neither configuration of
which I can change; one's my Web host the other a client.
>
Quote:
Quote:
My Web host requires the use of the ".php5" extension
to use PHP v5.1.4; where ".php" is used for PHP v4.3.11.
My client supports PHP v5.2.0 with the ".php" extension.
>
Quote:
Quote:
Is there a way to reliably determine if the ".php5" extension
must be used on a server? Perhaps via a "phpinfo()" value?
>
Quote:
Quote:
I have a page that uses the v5 function "file_put_contents()".
(I like it's LOCK_EX feature.)
>
Quote:
Quote:
Thanks in advance.
>
Quote:
I tried this (to not write to the file in the function isn't supported):
>
Quote:
try {
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);
} catch (Exception $e) {
echo "Caught exception: ", $e->getMessage(), "\n";
}
>
Quote:
but got this error:
>
Quote:
Parse error: parse error, unexpected '{' ...
>
Quote:
It doesn't like my use of "try - catch".
Why isn't "try - catch" documented?
I found only one reference; (under "Exceptions").
>
Don't know if these help you any but two observations:
>
1) you can get the version of php with phpversion();http://fi.php.net/manual/en/function.phpversion.php
>
2) You can test wether a function exists with
>
if(function_exists('file_put_contents')){
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);} else {
>
echo "craptastic!";
>
}
>
--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
s...@outolempi.net | Gedoon-S @ IRCnet | rot13(x...@bhgbyrzcv.arg)
oh and of course, dont forget the other typo ,->. further on the same
line!!

McKirahan
Guest
 
Posts: n/a
#7: Feb 16 '07

re: .php5 versus .php


"Rik" <luiheidsgoeroe@hotmail.comwrote in message
news:op.tnsw4xtiqnv3q9@misant...
On Thu, 15 Feb 2007 18:12:30 +0100, McKirahan <News@McKirahan.comwrote:
Quote:
Quote:
>Is there a way to reliably determine if the ".php5" extension
>must be used on a server? Perhaps via a "phpinfo()" value?
>>
I tried this (to not write to the file in the function isn't supported):
>
try {
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);
} catch (Exception $e) {
echo "Caught exception: ", $e->getMessage(), "\n";
}
>
but got this error:
>
Parse error: parse error, unexpected '{' ...
>
It doesn't like my use of "try - catch".
Why isn't "try - catch" documented?
I found only one reference; (under "Exceptions").
try - catch is only usefull for Exceptions, and hence that's where they're
found. Also, Exceptions are introduced in PHP5, so that's no way to fall
back to PHP4.

Usefull for determening current PHP / newer functionality:
<http://www.php.net/phpversion>
<http://pear.php.net/package/PHP_Compat>

Now, I have no idea how to find out the addtype declarations in apaches
configuration with PHP, but this cumbersome workaround will probably work:

----checktype.php5--
echo PHP_VERSION;
--------------------

---check.php--------
echo "Current .php version is ".PHP_VERSION."\n";
$path = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/';
$php5 = file_get_contents($path.'checktype.php5');
if(preg_match('/^<\?/',$php5)){
echo ".php5 is not supported as an extention";
} else {
echo ".php5 uses version ".$php5;
$result = version_compare(PHP_VERSION,$php5);
if($result == 0){
echo "\nversions are equal";
} else {
echo "\nversion used for .php5 is ".(($result==-1)?'higher':'lower');
}
}
--------------------

Thanks for the information.


McKirahan
Guest
 
Posts: n/a
#8: Feb 16 '07

re: .php5 versus .php


"Kimmo Laine" <spam@outolempi.netwrote in message
news:er27ds$1ja$1@nyytiset.pp.htv.fi...
Quote:
McKirahan kirjoitti:
Quote:
"McKirahan" <News@McKirahan.comwrote in message
news:dO6dnRHVOfLPGknYnZ2dnUVZ_uy3nZ2d@comcast.com. ..
Quote:
I am working in two environments neither configuration of
which I can change; one's my Web host the other a client.
>
My Web host requires the use of the ".php5" extension
to use PHP v5.1.4; where ".php" is used for PHP v4.3.11.
My client supports PHP v5.2.0 with the ".php" extension.
>
Is there a way to reliably determine if the ".php5" extension
must be used on a server? Perhaps via a "phpinfo()" value?
>
I have a page that uses the v5 function "file_put_contents()".
(I like it's LOCK_EX feature.)
>
Thanks in advance.

I tried this (to not write to the file in the function isn't supported):

try {
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);
} catch (Exception $e) {
echo "Caught exception: ", $e->getMessage(), "\n";
}

but got this error:

Parse error: parse error, unexpected '{' ...

It doesn't like my use of "try - catch".
Why isn't "try - catch" documented?
I found only one reference; (under "Exceptions").
>
Don't know if these help you any but two observations:
>
1) you can get the version of php with phpversion();
http://fi.php.net/manual/en/function.phpversion.php
>
2) You can test wether a function exists with
>
if(function_exists('file_put_contents')){
file_put_contents($file, $text, FILE_APPEND+LOCK_EX);
} else {
echo "craptastic!";
}
Thanks! I'm going to use "function_exists()".


McKirahan
Guest
 
Posts: n/a
#9: Feb 16 '07

re: .php5 versus .php


"shimmyshack" <matt.farey@gmail.comwrote in message
news:1171577754.774839.155030@a34g2000cwb.googlegr oups.com...
On Feb 15, 6:05 pm, Kimmo Laine <s...@outolempi.netwrote:

[snip]
Quote:
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
s...@outolempi.net | Gedoon-S @ IRCnet | rot13(x...@bhgbyrzcv.arg)
oh and of course, dont forget the other typo ,->. further on the same
line!!


Please notify the PHP Documentation Group; here's their example:

Chapter 20. Exceptions

Example 20-1. Throwing an Exception

<?php
try {
$error = 'Always throw this error';
throw new Exception($error);

// Code following an exception is not executed.
echo 'Never executed';

} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}

// Continue execution
echo 'Hello World';
?>



Rik
Guest
 
Posts: n/a
#10: Feb 16 '07

re: .php5 versus .php


On Fri, 16 Feb 2007 02:48:06 +0100, McKirahan <News@McKirahan.comwrote:
Quote:
Thanks! I'm going to use "function_exists()".
Don't forget PEAR PHP_Compat, saves a lot of headaches in trying to write
your own workarounds...
--
Rik Wasmus
Kimmo Laine
Guest
 
Posts: n/a
#11: Feb 16 '07

re: .php5 versus .php


"McKirahan" <News@McKirahan.comwrote in message
news:FcidnT_ei-gIkUjYnZ2dnUVZ_syunZ2d@comcast.com...
Quote:
"shimmyshack" <matt.farey@gmail.comwrote in message
news:1171577754.774839.155030@a34g2000cwb.googlegr oups.com...
On Feb 15, 6:05 pm, Kimmo Laine <s...@outolempi.netwrote:
>
[snip]
>
Quote:
>"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
>s...@outolempi.net | Gedoon-S @ IRCnet | rot13(x...@bhgbyrzcv.arg)
>
oh and of course, dont forget the other typo ,->. further on the same
line!!
>
>
Please notify the PHP Documentation Group; here's their example:
>
Chapter 20. Exceptions
>
Example 20-1. Throwing an Exception
>
<?php
try {
$error = 'Always throw this error';
throw new Exception($error);
>
// Code following an exception is not executed.
echo 'Never executed';
>
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}

The gag here is that when using a dot, you're concatenating two strings,
when using a comma your passing two (or more) arguments to echo, so the
comma thing only works with echo which is capable of recieveing arbitrary
number of parameters, unlike print for example. Thus print('foo','bar')
doesn't work while echo('foo','bar') does. Actually it might save just a
teeny bit of cpu cycles if the strings aren't concatenated but instead
passed as separate parameters. Go figure. For the sake of readability, using
dots consistently might be wise.

--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti päivittyvä nettisarjis
spam@outolempi.net | rot13(xvzzb@bhgbyrzcv.arg)


McKirahan
Guest
 
Posts: n/a
#12: Feb 16 '07

re: .php5 versus .php


"Rik" <luiheidsgoeroe@hotmail.comwrote in message
news:op.tnto7jx2qnv3q9@misant...
Quote:
On Fri, 16 Feb 2007 02:48:06 +0100, McKirahan <News@McKirahan.comwrote:
Quote:
Thanks! I'm going to use "function_exists()".
>
Don't forget PEAR PHP_Compat, saves a lot of headaches in trying to write
your own workarounds...
--
Rik Wasmus
I'm rather new to PHP (though I know JS and VBS);
how can I determine if PEAR is installed on the Web server?


shimmyshack
Guest
 
Posts: n/a
#13: Feb 17 '07

re: .php5 versus .php


On Feb 16, 6:37 am, "Kimmo Laine" <s...@outolempi.netwrote:
Quote:
"McKirahan" <N...@McKirahan.comwrote in message
>
news:FcidnT_ei-gIkUjYnZ2dnUVZ_syunZ2d@comcast.com...
>
>
>
Quote:
"shimmyshack" <matt.fa...@gmail.comwrote in message
news:1171577754.774839.155030@a34g2000cwb.googlegr oups.com...
On Feb 15, 6:05 pm, Kimmo Laine <s...@outolempi.netwrote:
>
Quote:
[snip]
>
Quote:
Quote:
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
s...@outolempi.net | Gedoon-S @ IRCnet | rot13(x...@bhgbyrzcv.arg)
>
Quote:
oh and of course, dont forget the other typo ,->. further on the same
line!!
>
Quote:
Please notify the PHP Documentation Group; here's their example:
>
Quote:
Chapter 20. Exceptions
>
Quote:
Example 20-1. Throwing an Exception
>
Quote:
<?php
try {
$error = 'Always throw this error';
throw new Exception($error);
>
Quote:
// Code following an exception is not executed.
echo 'Never executed';
>
Quote:
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
>
The gag here is that when using a dot, you're concatenating two strings,
when using a comma your passing two (or more) arguments to echo, so the
comma thing only works with echo which is capable of recieveing arbitrary
number of parameters, unlike print for example. Thus print('foo','bar')
doesn't work while echo('foo','bar') does. Actually it might save just a
teeny bit of cpu cycles if the strings aren't concatenated but instead
passed as separate parameters. Go figure. For the sake of readability, using
dots consistently might be wise.
>
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpkhttp://outolempi.net/ahdistus/- Satunnaisesti päivittyvä nettisarjis
s...@outolempi.net | rot13(x...@bhgbyrzcv.arg)
yeah, do you know in years of php programming I've only ever
concatenated strings when using echo - my bad - although I always use
' instead of " so brownie points there huh! perhaps its time to go
read up on some other functions too! sorry for any confusion, I don't
think ill be notifying the php doc group!

Rik
Guest
 
Posts: n/a
#14: Feb 17 '07

re: .php5 versus .php


On Sat, 17 Feb 2007 00:54:36 +0100, shimmyshack <matt.farey@gmail.com>
wrote:
Quote:
yeah, do you know in years of php programming I've only ever
concatenated strings when using echo - my bad - although I always use
' instead of " so brownie points there huh! perhaps its time to go
read up on some other functions too! sorry for any confusion, I don't
think ill be notifying the php doc group!
echo is not a function, it's a construct :P
Hence the unexpecyed behaviour.
--
Rik Wasmus
Rik
Guest
 
Posts: n/a
#15: Feb 17 '07

re: .php5 versus .php


McKirahan <News@McKirahan.comwrote:
Quote:
I'm rather new to PHP (though I know JS and VBS);
how can I determine if PEAR is installed on the Web server?
All coding issues aside: easiest and fastest way is just to ask you hoster.


--
Rik Wasmus
Rik
Guest
 
Posts: n/a
#16: Feb 17 '07

re: .php5 versus .php


Hmmmz, anyone else getting this twice? Seeems to be a trouble with Opera
newsgrouphandling, but I'm not sure.....

--
Rik Wasmus

Thinking that after a long satisfying trial of Opera it may very well be
it's got some irreconcilable flaw
Curtis
Guest
 
Posts: n/a
#17: Feb 17 '07

re: .php5 versus .php


Rik wrote:
Quote:
Hmmmz, anyone else getting this twice? Seeems to be a trouble with Opera
newsgrouphandling, but I'm not sure.....
>
--Rik Wasmus
>
Thinking that after a long satisfying trial of Opera it may very well be
it's got some irreconcilable flaw
I don't recall any problems like that while using Opera. However, I've
been sticking with Thunderbird, lately.

--
Curtis
Curtis
Guest
 
Posts: n/a
#18: Feb 17 '07

re: .php5 versus .php


McKirahan wrote:
Quote:
I am working in two environments neither configuration of
which I can change; one's my Web host the other a client.
>
My Web host requires the use of the ".php5" extension
to use PHP v5.1.4; where ".php" is used for PHP v4.3.11.
My client supports PHP v5.2.0 with the ".php" extension.
>
Is there a way to reliably determine if the ".php5" extension
must be used on a server? Perhaps via a "phpinfo()" value?
>
I have a page that uses the v5 function "file_put_contents()".
(I like it's LOCK_EX feature.)
>
Thanks in advance.
>
>
What's wrong with coding your own version of file_put_contents? The
cool thing about the user notes on php.net's docs, is that if there
are any backward compatibility issues, users will usually post
workaround functions. Over time, they generally get more efficient, as
one person tries to do the same thing more efficiently than the last.
The user notes aren't validated though, so you need to have your wits
about you when it comes to making sure code won't become a security risk.

--
Curtis
Kimmo Laine
Guest
 
Posts: n/a
#19: Feb 17 '07

re: .php5 versus .php


Rik kirjoitti:
Quote:
On Sat, 17 Feb 2007 00:54:36 +0100, shimmyshack <matt.farey@gmail.com>
wrote:
Quote:
>yeah, do you know in years of php programming I've only ever
>concatenated strings when using echo - my bad - although I always use
>' instead of " so brownie points there huh! perhaps its time to go
>read up on some other functions too! sorry for any confusion, I don't
>think ill be notifying the php doc group!
>
echo is not a function, it's a construct :P
Hence the unexpecyed behaviour.
--Rik Wasmus
Normal functions are also capable of recieveing an arbitrary number of
parameters. Print just isn't programmed to handle them. It's true that
echo is a language construct, but that doesn't make it magical.

Something like this should work: (didn't test thou)

function print_multiple(){
foreach(func_get_args() as $arg)
print($arg);
}

print_multiple('Hello', ' ', 'world!'); // Using commas instead of dots.

--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
Rik
Guest
 
Posts: n/a
#20: Feb 17 '07

re: .php5 versus .php


On Sat, 17 Feb 2007 14:41:08 +0100, Kimmo Laine <spam@outolempi.netwrote:
Quote:
Rik kirjoitti:
Quote:
>On Sat, 17 Feb 2007 00:54:36 +0100, shimmyshack <matt.farey@gmail.com>
>wrote:
Quote:
>>yeah, do you know in years of php programming I've only ever
>>concatenated strings when using echo - my bad - although I always use
>>' instead of " so brownie points there huh! perhaps its time to go
>>read up on some other functions too! sorry for any confusion, I don't
>>think ill be notifying the php doc group!
> echo is not a function, it's a construct :P
>Hence the unexpecyed behaviour.
>--Rik Wasmus
>
Normal functions are also capable of recieveing an arbitrary number of
parameters. Print just isn't programmed to handle them. It's true that
echo is a language construct, but that doesn't make it magical.
Indeed you are right, I was talking out of my ass. Being a construct has
nothing to do with it (other then you don't need brackets). Why the hell
do I feel the need to post at 5 o'clock at night after a party?
--
Rik Wasmus
Closed Thread