Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Ampersand


  • Please log in to reply
39 replies to this topic

#25 chili5

chili5

    CC Mentor

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3038 posts
  • Programming Language:Java, C#, PHP, JavaScript, Ruby, Transact-SQL
  • Learning:C, Java, C++, C#, PHP, JavaScript, Ruby, Transact-SQL, Assembly, Scheme, Haskell, Others

Posted 21 September 2008 - 07:50 AM

You have no idea what your talking about.

echo is just as valid, as it always was.
  • 0

#26 ArtoStiloz

ArtoStiloz

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 104 posts

Posted 21 September 2008 - 09:44 AM

Yes, ECHO is as valid as it always has been, but most see it as if it were an old and worn furniture. Well, believe me, I know what I am talking about, PRINT is present and the future.
  • 0
[SIGPIC][/SIGPIC]
Http://www.ArtoStiloz.Dk

#27 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 21 September 2008 - 11:10 AM

I've always seen echo() used, not print().
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#28 John

John

    CC Mentor

  • Moderator
  • 4450 posts
  • Location:New York, NY

Posted 21 September 2008 - 12:33 PM

Why the ** would anyone want to use a function call with a return value -- print -- when they can use a language construct -- echo?

You have your logic messed up.
  • 0

#29 chili5

chili5

    CC Mentor

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3038 posts
  • Programming Language:Java, C#, PHP, JavaScript, Ruby, Transact-SQL
  • Learning:C, Java, C++, C#, PHP, JavaScript, Ruby, Transact-SQL, Assembly, Scheme, Haskell, Others

Posted 21 September 2008 - 12:35 PM

I thought that was what it was, that print was a function.

It's faster to use echo I think. Don't have proof of that, but it makes sense sorta, since echo doesn't return any value.

I don't know print is just weird. :s
  • 0

#30 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 21 September 2008 - 12:36 PM

What does print() return?
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#31 chili5

chili5

    CC Mentor

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3038 posts
  • Programming Language:Java, C#, PHP, JavaScript, Ruby, Transact-SQL
  • Learning:C, Java, C++, C#, PHP, JavaScript, Ruby, Transact-SQL, Assembly, Scheme, Haskell, Others

Posted 21 September 2008 - 12:37 PM

No idea :D Apparently it does though.
  • 0

#32 John

John

    CC Mentor

  • Moderator
  • 4450 posts
  • Location:New York, NY

Posted 21 September 2008 - 12:38 PM

print always returns 1
  • 0

#33 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 21 September 2008 - 12:39 PM

Perhaps a boolean?
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#34 John

John

    CC Mentor

  • Moderator
  • 4450 posts
  • Location:New York, NY

Posted 21 September 2008 - 12:42 PM

It always returns 1. Never returns 0. So it cannot be used as a boolean.
  • 0

#35 ArtoStiloz

ArtoStiloz

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 104 posts

Posted 22 September 2008 - 11:40 AM

PRINT is more recent than ECHO, so it is hardly slower than ECHO. It is much more logical to use the PRINT, but to use ECHO..
  • 0
[SIGPIC][/SIGPIC]
Http://www.ArtoStiloz.Dk

#36 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 22 September 2008 - 11:50 AM

It always returns 1. Never returns 0. So it cannot be used as a boolean.

Sorry, didn't see your other post, you posted at the same time.

Woah - always? What's the point of that?
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download