{"componentChunkName":"component---src-templates-blog-post-js","path":"/why-php-is-a-good-first-language-to-learn/","result":{"data":{"site":{"siteMetadata":{"title":"Nerd Exe Blog"}},"markdownRemark":{"id":"b50f2b92-1db7-547e-a15e-c287465652e5","excerpt":"Introduction Hello world, I would like to start with what php is Incase you don’t know. PHP stands for Hypertext Preprocessor. It is a server side language ie…","html":"<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/ace80f88a07c1bb2bfdd33b459acd2f7/29114/0d398405-d0a5-4c9d-810c-2033cc18e1b3.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 56.08108108108109%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsSAAALEgHS3X78AAACGklEQVQoz4WS7VNSURCH+af7C/rYh/ymWfYCDTI5SSOVNGrJxfCaKODbYFM42iQqmMC9cOGec8/THgSjD007s7Nnzpx9zu5vN2aMQWtNv9/H8zwGgwHW7L21QBuOfU3hJiT3K2SrpfjmaRq+odkztEJDLzIoeW9zYmPgpA1h4j0dUZHkgkC22oovEgsCzTVDClchxQvNXktz2hfwCDoERlFEGIYope4qtPYjRBIGfO1GVKXKI89w0IbtBrjXsHYOHy7hc1tzIpV2LdDCrDmOQyKRYD6VolwusZh5y3t3h9TyKjPzC7xayTGbWmLqWZqp+DIPXrzj/uPX3JtZJHPe56AX0RJ5YkEQDIHVapVisUi5UmFH4pqTZzm/ibNbIZt3+eTus5TdJbmwQzJ9KJ+4zGVKPHxTIVm6YKNWxxdOzLZpzXXlwdwcK6urTE9Pk0gmmX0e50n8JY+exqlLa7VjKLmwWRAvS6tVyB5Brqaoib6BNHunodWu0+ng+/7QPc/nuuOJ+1w1fX5+lwF81GwsatYzGiencLYVuZKiWjfcSKMq+seUJ80qHMqcmqeyPuuGYlo8a9jfNhweGWpnRj41DJRdG/4Au90ujUaDsaZmtFeRuLITvDbUDw0nW4azPcOlgG7kriu7GCozWrUJoNXSwsbVjoG3Z9BSZdACX1amJzEMbJ6Va/zuf4v9F1SiJGqpVA9uoxmBzAg09t/FJTMKp9ouZgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Header\"\n        title=\"Intro banner\"\n        src=\"/static/ace80f88a07c1bb2bfdd33b459acd2f7/fcda8/0d398405-d0a5-4c9d-810c-2033cc18e1b3.png\"\n        srcset=\"/static/ace80f88a07c1bb2bfdd33b459acd2f7/12f09/0d398405-d0a5-4c9d-810c-2033cc18e1b3.png 148w,\n/static/ace80f88a07c1bb2bfdd33b459acd2f7/e4a3f/0d398405-d0a5-4c9d-810c-2033cc18e1b3.png 295w,\n/static/ace80f88a07c1bb2bfdd33b459acd2f7/fcda8/0d398405-d0a5-4c9d-810c-2033cc18e1b3.png 590w,\n/static/ace80f88a07c1bb2bfdd33b459acd2f7/efc66/0d398405-d0a5-4c9d-810c-2033cc18e1b3.png 885w,\n/static/ace80f88a07c1bb2bfdd33b459acd2f7/c83ae/0d398405-d0a5-4c9d-810c-2033cc18e1b3.png 1180w,\n/static/ace80f88a07c1bb2bfdd33b459acd2f7/29114/0d398405-d0a5-4c9d-810c-2033cc18e1b3.png 1920w\"\n        sizes=\"(max-width: 590px) 100vw, 590px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n  </a>\n    </span></p>\n<h2><strong>Introduction</strong></h2>\n<p>Hello world, I would like to start with what php is Incase you don’t know. <strong>PHP</strong> stands for Hypertext Preprocessor. It is a server side language ie it’s a type of language that processes your form when you submit or that redirect when you are not logged in, though a server side language does way more than that.</p>\n<p>PHP is actually very simple and beginner friendly and I actually learnt it as my first language but still I wouldn’t recommend it as a first programming language to learn.</p>\n<p><strong>What does not make a good first language</strong></p>\n<ol>\n<li>Language with complex and long syntax</li>\n<li>Writing very long code for everything</li>\n<li>Hard concepts like C’s pointers</li>\n<li>Statically typed.</li>\n</ol>\n<p>Etc</p>\n<p>The above are traits of a bad beginner first language unless you have a super interest in learning coding like me you can opt for a language like c, c++ etc thathas this traits. Else you’ll loose the little interest you have left.</p>\n<h5>What makes a good language</h5>\n<ol>\n<li>Short and easy syntax like php</li>\n<li>Write short codes for simple tasks and not too long code for complex tasks</li>\n<li>Simple concepts</li>\n<li>Dynamically types ie declaring a variable without specifying whether it’s a string, float, Boolean etc.</li>\n</ol>\n<p>The above are attributes of a good beginner first language and guess what PHP has all these attributes and even more. Then why did I say it’s bad?</p>\n<h5>Why PHP is great as a first language for beginner</h5>\n<p>People often have poor decisions in the past, such as enabling magic quotes (which automatically escape post, get and cookie vars with backslashes, sometimes leading to confusion) and register globals (get, post, cookie and some other vars get automatically registered on the global scope) by default. These two are also often used as general attacks on PHP – which I really don’t understand. Sure, they aren’t exactly good things, but you can disable them.</p>\n<p>Some also say that PHP’s builtin functions don’t really follow any conventions, which is not true at all. It may not follow a specific convention 100% strictly, but it does not make it a worse language as it’s more than enough similar for most parts.</p>\n<p><br>\nMost often said, People say it is very easy to write bad codes in PHP, I totally agree with that but what’s bad in writing bad codes if you are just a beginner 🤷‍♂️. I highly recommend learning php. It’ll simple make you more interested in programming and set you up for languages you’ll be considering in the future.</p>\n<p><br>\n<strong>PHP is just perfect for you</strong></p>\n<p>With the points made, I would say PHP is definitely a perfect language for beginners looking to get into web development/programming.</p>\n<p>PHP is not a complex language, not even close to complex. It’s quite easy to use and understand, but it still has the features of a “real” programming language like Object Oriented Programming. It can be an easy beginner’s language, but it also provides you room for learning new things.</p>\n<p>PHP has a <em>huge</em> library of built in functions and classes that make almost all tasks very easy to do. Read the contents of a file? Sure – $myvar = file<em>get</em>contents(‘myfile.txt’); – Now, do it in C…</p>\n<p>And thanks to the above points and the fact that you can embed PHP in HTML, it’s very easy to make something that you can feel proud of. Just throw together some HTML and PHP, host it and you can show everyone what cool stuff you’ve made.</p>\n<p>And finally, PHP is a very popular language! If you learn PHP, you can be sure that you can find employment coding it as above 70% web apps run php as backend and it’s been used by tech moguls like Facebook, yahoo, wordpress etc.</p>\n<h5>Conclusion</h5>\n<p>Don’t let anyone mislead you, if you’re considering web development, PHP is your guy, you can learn online or hire a guy like me to reach you. For feed back or questions. Email me at samahd626@gmail.com. Thanks for reading and best of luck with your career.</p>","frontmatter":{"title":"Why PHP is a good first language to learn","date":"July 29, 2020","description":"Hello, this post is about why you should learn php as a beginner aspiring to be a pro someday. You should read this if you really want to be pro."}}},"pageContext":{"slug":"/why-php-is-a-good-first-language-to-learn/","previous":{"fields":{"slug":"/hello-world/index-1/"},"frontmatter":{"title":"What you'll find here"}},"next":{"fields":{"slug":"/getting-started-with-react-js/"},"frontmatter":{"title":"Getting started with React JS"}}}}}