| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
| View Poll Results: Print or echo? | |||
| | 2 | 11.11% | |
| echo | | 15 | 83.33% |
| What are you even talking about? | | 1 | 5.56% |
| Voters: 18. You may not vote on this poll | |||
![]() |
| | LinkBack | Thread Tools |
| | #2 (permalink) |
| DNOA Member | echo("string"); is my format.
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #5 (permalink) |
| Senior Member | i use echo("") because it sounds cooler than print lol.
__________________ Hacksar.com - Your source for random computer tips and tricks! MySiteMemberships.com - Keep track of your site registration information! Like my post? Rep is appreciated! |
| |
| | #6 (permalink) | |
| DNOA Member | Quote:
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! | |
| |
| | #7 (permalink) |
| NamePros Regular | echo is what I use
__________________ :guilty: A young web developer’s journey to financial freedom. - aaronfalloon.com |
| |
| | #9 (permalink) | |
| Account Closed | Alright, echo IS faster than print. But! Heres why: echo is 4 characters (4 bytes) print is 5 characters (5 bytes) That difference would only matter on a system below a 1ghz processor hell, its hardly noticable!The ONLY difference is 1byte of space... so even 1milisecond... heh thats not bad cause i only have 3 print statements per file execution.PHP Code: Quote:
http://php.net/print Always returns true. Or 1. Its a language constructor | |
| |
| | #10 (permalink) |
| Senior Member | just a note to those using echo("") as per the php manual you do not need to use parentheses with it echo "" will work perfectly fine. I personally use echo "" as it is what I have just got used to doing.
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | #11 (permalink) | |
| Account Closed | Quote:
When i was "learning" php, i started using echo... but when i asked for help on a forum, the people would change it from echo to print when they replied... no clue why :-/ So i said the hell with it and started using print lol | |
| |
| | #12 (permalink) | |
| NamePros Regular | Quote:
It does however, take additional time to process the return value (1), but very negligble. It's really a moot issue, use what you feel comfortable with. And who uses multiple echo/print's per page anyways?
__________________ OnlineGames.net | |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial: Getting started with PHP (The Basics) | deadserious | Webmaster Tutorials | 60 | 11-17-2007 11:35 AM |
| Googlism - What does google think of you? | deadserious | The Break Room | 55 | 12-15-2005 09:09 AM |
| Professional PHP & MySQL programming! | CreativeLogic | For Sale / Advertising Board | 0 | 06-07-2004 08:26 PM |