| | #1 |
| Warrior Member Join Date: 2015
Posts: 27
Thanks: 0
Thanked 2 Times in 2 Posts
| Is PHP a badly designed programming language? |
|
One way to get the most out of life is to look upon it as an adventure. My life is all about best SUV's and SEO .
| |
| |
| | #2 |
| Active Warrior War Room Member Join Date: 2009 Location: Houston, Texas
Posts: 77
Thanks: 4
Thanked 11 Times in 10 Posts
|
That's a very open ended question. The correct question is what do you consider to be features of good programming language vs what do you consider to be features of bad programming language?
|
|
Need A PHP Programmer That You Can Count On, That's Professional, Experienced in working with small and large clients. Reach me on skype at "Netlyte" or visit me at http://www.LCCWebDesign.com | |
| |
| | #3 |
| Warrior Member Join Date: 2015
Posts: 27
Thanks: 0
Thanked 2 Times in 2 Posts
|
Thanks, let me correct my question what are pros and cons of PHP as a programming language ?
|
|
One way to get the most out of life is to look upon it as an adventure. My life is all about best SUV's and SEO .
| |
| |
| | #4 |
| Warrior Member Join Date: 2015
Posts: 23
Thanks: 0
Thanked 1 Time in 1 Post
|
Can you be little more clear with your question
|
| |
| | #5 |
| HyperActive Warrior War Room Member Join Date: 2009
Posts: 156
Thanks: 1
Thanked 11 Times in 10 Posts
|
Yes it is, one reason being that is tries to be both a object-oriented language and a functional language. Also function signatures are not consistent. For example you may have a string function where the "haystack" parameter is the first parameter and another string function where the "haystack" parameter is the last parameter.
|
| | |
| |
| | #6 |
| New Warrior Member Join Date: 2015
Posts: 13
Thanks: 3
Thanked 2 Times in 2 Posts
|
One pro for PHP is the constant development of the language. New features are added and there is an upcoming version (5.7 or 7, what ever it will be) that will address performance issues and according to them will run at least 2 times as fast for current code.
|
| |
| | #7 |
| Active Warrior Join Date: 2015 Location: Tallinn, Estonia
Posts: 91
Thanks: 2
Thanked 20 Times in 18 Posts
|
I think PHP is beautiful. Especially when written OO style, but I keep hearing more and more about node.js which is a server side javascript language that is supposedly replacing PHP in the future.
|
|
Content writer, web developer, SEO consultant - Ynef's Portfolio | |
| |
| | #8 |
| HyperActive Warrior Join Date: 2015 Location: Raipur
Posts: 153
Thanks: 0
Thanked 15 Times in 15 Posts
|
hello, according to me php is just not that bad. using php you can solve any problem related to web site development. its a scripting language. there are many other languages which will help in web development but php is the simplest. |
| | |
| |
| | #9 |
| Warrior Member Join Date: 2013
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
Here is the my code. I have created the code but everything is ok... but pagination is not working. Please Give a solution.... Here is the code: <script type="text/JavaScript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> <?php $page_url = 'managepageuser.php'; $display_per_page = constant("DISPLAYPERPAGE"); if(isset($_GET['pages']) && $_GET['pages']!="1") { $pages = $_GET['pages']; $from_limit = ($pages-1) * $display_per_page; $to_limit = $from_limit + $display_per_page; } else { $pages = 1; $from_limit = 10; $to_limit = $from_limit + $display_per_page; } if($to_limit > $num_lists) { $to_limit = $num_lists; } if($num_lists > 0) { $total_pages = intval($num_lists / $display_per_page); if($total_pages!='0') { if(($num_lists % $display_per_page) !='0') { $total_pages = $total_pages +1; } } $prev = $pages - 1; $next = $pages + 1; $first = 1; $last = $total_pages; $pages_cnt = 1; if($total_pages > $pages_cnt) { $paging_txt .= "<a href='$page_url?pages=$first'>«« FIRST</a> | "; if($pages >1) { $paging_txt .= " <a href='$page_url?pages=$prev'>«PREVIOUS</a> | "; } $paging_txt .= "<select name=\"menu1\" onchange=\"MM_jumpMenu('parent',this,0)\">"; while($pages_cnt <= $total_pages) { //$paging_txt .= " | <a href='$page_url?pages=$pages_cnt'>".$pages_cnt."</a>"; $paging_txt .= "<option value='".$page_url."?pages=".$pages_cnt."'"; if($pages_cnt == $_GET['pages']) { $paging_txt.= "selected"; } $paging_txt.= ">".$pages_cnt."</option>"; $pages_cnt++; } $paging_txt .= "</select>"; if($pages > 0 && $pages < $total_pages) { $paging_txt .= " | <a href='$page_url?pages=$next'>NEXT»</a>"; } if($pages !=$total_pages) { $paging_txt .= " | <a href='$page_url?pages=$last'>LAST »»</a>"; } } } ?> <?php if((isset($_GET['cmd'])) && ($_GET['cmd'] == "status")) { mysql_query("update $from_limittabledouser set driver_status='".$_GET['status']."' where driver_id='".$_GET['id']."'") or die(mysql_error()); } if((isset($_GET['cmd'])) && ($_GET['cmd'] == "del")) { mysql_query("delete from $tabledouser where id='".$_GET['id']."'") or die(mysql_error()); } /**** FETCH ALL DRIVER RECORDS ***/ if($_SESSION['admintype'] == 'superadmin') { $sql_list = mysql_query("select * from $tabledouser order by user_name ASC") or die(mysql_error()); $num_list = mysql_num_rows($sql_list); } else { $sql_list = mysql_query("select * from $tabledouser order by user_name ASC") or die(mysql_error()); $num_list = mysql_num_rows($sql_list); } ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <?php if(isset($_GET['success_msg'])) { ?> <tr> <td valign="top" align="center" class="greentxt"><?php echo $_GET['success_msg']; ?></td> </tr> <?php } ?> <?php if($num_list > 0) { ?> <tr> <td valign="top" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="rowstbl display" rel="datatable" id="example"> <thead> <tr> <th width="6%" align="center" nowrap="nowrap"> </th> <th width="11%" align="center" nowrap="nowrap">ID </th> <th width="8%" align="center" nowrap="nowrap">User Name </th> <th width="8%" align="center" nowrap="nowrap">Full Name</th> <th width="28%" align="center" nowrap="nowrap">Email</th> <th width="17%" align="center" nowrap="nowrap">Mobile Number </th> <th width="8%" align="center" nowrap="nowrap">Time Login</th> <th width="10%" align="center" nowrap="nowrap">Edit</th> <th align="center">Delete</th> </tr> <tbody> <?php while($res_list = mysql_fetch_array($sql_list)) { $current_time = date("Y-m-d H:i:s"); $last_current_time = date("Y-m-d H:i:s",mktime(date("H"),date("i")-1,date("s"),date("m"),date("d"),date("Y"))); ?> <tr> <td align="center"><?php if((isset($_GET['id'])) && ($_GET['id'] == $res_list['id'])) { ?><img src="images/tick.png" /><?php } ?></td> <td align="center"><?php echo $res_list['id']; ?></td> <td align="center"><?php echo $res_list['user_name']; ?></td> <td align="center"><?php echo $res_list['full_name']; ?></td> <td align="center"><?php echo $res_list['email']; ?></td> <td align="center"><?php echo $res_list['cntrycode'].'-'.$res_list['mobile']; ?></td> <td align="center"><?php echo $res_list['create_at']; ?></td> <td align="center"><a href="javascript:confirmbox_edit(<?php echo $res_list['id']; ?>)"><img src="images/edit.png" width="29" height="29" border="0" /></a></td> <td align="center"><a href="javascript:confirmbox(<?php echo $res_list['id']; ?>)"><img src="images/delete.png" width="29" height="29" border="0" /></a></td> </tr> <?php } ?> </tbody> </table></td> </tr> <?php } else { ?> <tr> <td align="center" class="dtlboxbg tdmargin redtxt"><div align="center">NO RECORD FOUND</div></td> </tr> <?php } ?> </table> |
| |
| | #10 | |
| Warrior Member Join Date: 2015
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
|
And, 2. I run a news blog for nigerian students in my country but i want to learn how to code in java and PHP. Can someone suggest useful resources? | |
| |
| | #11 |
| Active Warrior Join Date: 2015 Location: Internet
Posts: 51
Thanks: 0
Thanked 8 Times in 8 Posts
|
There are mixed opinions about PHP. Is it a badly designed language? You can say that it is poorly maintained but to answer your above question, you will have to crack a debate here. Many people say that it creates ugly code and gives you tough time maintaining the code. But most of the time, it is not language's fault. It is developers fault which creates code bloats. |
| | |
| |
| The Following User Says Thank You to yourfriend78640 For This Useful Post: |
| | #12 |
| Warrior Member Join Date: 2015 Location: India
Posts: 29
Thanks: 0
Thanked 5 Times in 4 Posts
|
In my opinion, php is a badly designed programming language. The makers of PHP just wanted to solve a problem. PHP was something that happened and not a well thought out plan as Rasmus Lerdof, its creator says. Other languages, say like python was built for a purpose. Readability, easily deploy a site with little effort. Django, the most popular python framework has a tag line proving the same : "The web framework for perfectionists with deadlines.
|
| |
| | #13 |
| Kim Jong-un Advisor War Room Member Join Date: 2011 Location: The People's Republic of North Korea
Posts: 452
Thanks: 7
Thanked 68 Times in 53 Posts
|
95% of my PHP code is OO. My PHP code looks as clean as Java or C#. If your PHP code looks bad, give up.
|
| | |
| |
| | #14 |
| www.ecomstarterpack.com Join Date: 2013 Location: France
Posts: 249
Thanks: 48
Thanked 49 Times in 43 Posts
|
I dont think that php is badly designed language as most of the cms system are using php and its working quite well for even programers and end users too
|
| |
| | #15 |
| HyperActive Warrior Join Date: 2015 Location: Raipur
Posts: 153
Thanks: 0
Thanked 15 Times in 15 Posts
|
Any programming language is not bad, every language has their own pros and cons. php stands for hyper text preprocessor. it is open source programming language means php software's and code are freely available on the web and we can modify and enhance the code. no licence is required. php is most suited for web development.
|
| | |
| |
| | #16 |
| Full Stack LAMP Developer War Room Member |
PHP, like most languages, can be as good or bad as you make it. Lots of people turn their noses up at PHP because there is so much bad PHP code out there. Of course, most of those people that I have met don't write the greatest code themselves. Any good programmer can use most languages and end up with good clean code. Any mediocre programmer can use most languages and end up with something that is bloated and hard to maintain. I don't believe the language itself is badly designed. I just feel that being a relatively easy language to get started with (no need to learn about compilation, library linking, and other things that many languages need), lots of people new to programming use it with sub par results. I personally haven't encountered anything that was terribly hard to do with PHP excepting those things that PHP simply cannot do... |
|
A full stack LAMP+Javascript developer with 20 years of experience. Oh right ... and a marketer in progress.
| |
| |
| | #17 |
| Active Warrior Join Date: 2015
Posts: 39
Thanks: 0
Thanked 5 Times in 5 Posts
|
I love that ebook how to write PHP is 24hrs. However, on Sunday I found a Standford kid who explained how to write in PHP in like 7 minutes. I selected the video and boy, it is excellent. He covered nearly every reserved word, and visually showed how to write form and process the data on the back end, making for the perfect video. To truly grasp what he is saying, you need to have learned a programming language other than php because he explains/defines variables, strings and use of strings and that crazy {} bracket thing and that got me puzzled. I love writing code, but I am not a programmer, but I would like to apply it when necessary. Learn PHP and if you are not information technology, it will take a while. I love solving problems by extending a software program, ie MS Office, outlook, access, DOS or Windows, filezilla, etc.but one thing I have noticed, I can not get paid doing it, cause I suck at it I guess. Maybe? Another thing is because I suck at it, anything I write~ can be rewritten better by someone else, so I settle for what I know and for what I need. Sorry this message is so, so long.
|
| |
| | #18 |
| Active Warrior Join Date: 2015
Posts: 67
Thanks: 27
Thanked 9 Times in 8 Posts
|
I think you is fan ASP . I like PHP !
|
| |
| | #19 |
| Antone Roundy War Room Member Join Date: 2005 Location: Grand Island, NE, USA
Posts: 56
Thanks: 2
Thanked 30 Times in 16 Posts
|
Sure, PHP has it's blemishes (like argument order inconsistencies mentioned by kdavies). But there's nothing so wrong with it that it's not a perfectly good language for web development. On the other hand, it has several major strengths, such as: * It's supported practically everywhere. * It's drop dead easy to get started using. * You can stick code inline in HTML code to add little dynamic bits anywhere you want. If it were a "bad" language, I'd think projects like WordPress would have moved to something else long ago. Are there other languages that are "better"? Depending on what aspects of the language are most important to you, I'm sure there are. But it's a perfectly acceptable alternative. |
|
Antone Roundy Want up to 57 bloggers to support your blog? Join a Team (free). Keep your blog active faster and easier with "Blog Riffing": * Free: PDF, High Impact Blog Riffing Course | |
| |
| | #20 |
| Warrior Member Join Date: 2015
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
| PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. |
| |
| | #21 |
| Active Warrior Join Date: 2016
Posts: 54
Thanks: 2
Thanked 5 Times in 5 Posts
|
Personal Home Page (PHP) is a very easy programming language. Since it is very flexible, most people may think at first that it is badly designed website development language. Don't listen to those. It is all about perception. Go and learn it at once!
|
| | |
| |
|
| Bookmarks |
| Tags |
| php, programming |
| |