{"id":8502,"date":"2022-11-12T13:19:27","date_gmt":"2022-11-12T11:19:27","guid":{"rendered":"https:\/\/www.main-vision.com\/richard\/blog\/?p=8502"},"modified":"2022-11-12T13:19:30","modified_gmt":"2022-11-12T11:19:30","slug":"experimenting-with-php","status":"publish","type":"post","link":"https:\/\/www.main-vision.com\/richard\/blog\/experimenting-with-php\/","title":{"rendered":"Experimenting with PHP"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<p class=\"wp-block-paragraph\">I have been following courses for three years now. Within the last week or two I decided to start experimenting with PHP using my website as a guinea pig. I have already converted a few pages to PHP. Some of them use for each loops and others use the include functionality. My aim is to practice the skills that I have studied, within a production environment. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some of the tasks are repetitive. This isn&#8217;t a bad thing. It builds habit and understanding. By doing something frequently enough the pattern gets burned into my subconscious. When that&#8217;s done I will spot errors automatically, and if I get an error message I will know what it means. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One error message I got was $article was not found and after seeing it three or four times, I know to check that I have included the array data php file. Problem fixed, time to move on to the next page. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What I enjoy about PHP so far is that it&#8217;s intuitive. Error messages are from the line beneath the line where the error is. This means that bugs are fixed within seconds not minutes. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another aspect that I really appreciate about foreach loops is that they&#8217;re direct. With Javascript you need to understand the DOM, parent elements, children etc to get things to work. With PHP, so far, I work directly with the elements that I&#8217;m manipulating. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If I tried to do my instagram clone now I would find it much easier to do. I progressed. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Looking forward learning to use PHP directly, means that when I use WordPress, Laravel and other solutions I will understand what I am doing, and what is going wrong, if things do not work. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For now I am happy to rework my website. I will practice new skills. The website will benefit. <\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>I have been following courses for three years now. Within the last week or two I decided to start experimenting with PHP using my website as a guinea pig. I have already converted a few pages to PHP. Some of them use for each loops and others use the include functionality. My aim is to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[8],"tags":[],"class_list":["post-8502","post","type-post","status-publish","format-standard","hentry","category-website-news"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/posts\/8502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/comments?post=8502"}],"version-history":[{"count":1,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/posts\/8502\/revisions"}],"predecessor-version":[{"id":8503,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/posts\/8502\/revisions\/8503"}],"wp:attachment":[{"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/media?parent=8502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/categories?post=8502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/tags?post=8502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}