How to Optimize SQL Queries for Faster Sites
PHP

How to Optimize SQL Queries for Faster Sites

This article was originally published on the Delicious Brains blog, and is republished here with permission. You know that a fast site == happier users, improved ranking from Google, and increased conversions. Maybe you even think your WordPress site is as fast as it can be: you've looked at site performance, from the best practices of setting up a server, to troubleshooting slow code, and offloading your images to a CDN, but is that everything? With dynamic, database-driven websites like WordPress, you might still have one problem on your hands: database queries slowing down your site. In this post, I’ll take you through how to identify the queries causing bottlenecks, how to understand the problems with them, along with quick fixes and other approaches to speed things up. I’ll be using a...
How to Read Big Files with PHP (Without Killing Your Server)
PHP

How to Read Big Files with PHP (Without Killing Your Server)

It’s not often that we, as PHP developers, need to worry about memory management. The PHP engine does a stellar job of cleaning up after us, and the web server model of short-lived execution contexts means even the sloppiest code has no long-lasting effects. There are rare times when we may need to step outside of this comfortable boundary --- like when we're trying to run Composer for a large project on the smallest VPS we can create, or when we need to read large files on an equally small server.It’s the latter problem we'll look at in this tutorial. The code for this tutorial can be found on GitHub. Measuring Success The only way to be sure we’re making any improvement to our code is to measure a bad situation and then compare that measurement to another after we’ve applied our fix. I...
PHP

Your First PHP Code

The following is a short extract from our new book, PHP & MySQL: Novice to Ninja, 6th Edition, written by Tom Butler and Kevin Yank. It's the ultimate beginner's guide to PHP. SitePoint Premium members get access with their membership, or you can buy a copy in stores worldwide. Now that you have your virtual server up and running, it’s time to write your first PHP script. PHP is a server-side language. This concept may be a little difficult to grasp, especially if you’ve only ever designed websites using client-side languages like HTML, CSS, and JavaScript. A server-side language is similar to JavaScript in that it allows you to embed little programs (scripts) into the HTML code of a web page. When executed, these programs give you greater control over what appears in the browser windo...
PHP

What is PHP 7?

PHP 7 - a revolution in the field of web development. This is the most important change for PHP since the release of PHP 5 in 2004, bringing explosive performance improvements, drastically reduced memory consumption, and a host of brand-new language features to make your apps soar.You also be wondering why PHP named its latest release PHP 7 and not PHP 6. Reason behind it is that, many of the PHP 6 releases were already implemented in PHP 5.3 and later, there was not really a proper reason just to change the name. What I am trying to say here is that we haven’t missed anything. Just to avoid the confusion with a dead project, PHP's latest release was named to PHP 7.
PHP

What does phpinfo () do?

phpinfo () is used to check configuration settings and for available predefined variables on a given system. phpinfo () is also a valuable debugging tool as it contains all EGPCS (Environment, GET, POST, Cookie, Server)
PHP

What is the PHP?

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.
Learning PHP more Easily by Learning Python … what!?
PHP

Learning PHP more Easily by Learning Python … what!?

PHP is probably the best web app development language out there today for a bunch of reason technical, and market oriented. But it’s not the only language out there and it doesn’t have a monopoly of good programming. Comparing Programming Languages An important lessons that my 20+ years of programming experience has taught me, is that one of the best ways to learn one programming language, is to learn another! By learning different programming languages, you will start to gain deeper insights about your first programming language. Here is the key point, most modern programming languages share about 98% of the same principles and language constructs. That said, each language has their own subtle take on how they do things. So for example, PHP creates functions with this code: function eat...
Python 3 Course of College and University
PHP

Python 3 Course of College and University

I am excited to announce our upcoming Python course: Powerful Python 3. A beginners course covering Python 3, students go from an absolute neophyte, to having a working knowledge of object oriented Python.  Course is based on Python 3.6. StudioWeb course details: In addition to a set of comprehensive and engaging videos, Power Python 3 will include quizzing, code challenges, and gamification that is provided by the StudioWeb app. Your students will learn Python easily, and they will have fun too! Each video lesson is supported by 4-5 quiz questions, that are made up of both code challenges and multiple choice questions. All our courses leverage the recursive spiral teaching method that helps us to achieve great outcomes with students. Professor’s Dream: From a professor’s perspective, Stu...
Open Ended Lesson Plans and Teaching Code
PHP

Open Ended Lesson Plans and Teaching Code

After nearly 7 years of working with schools, it seems clear to me that the best way to teach code, is with an open ended lesson plan. Here’s why: Learners will learn at different speeds Different schools have different schedules Rigid lesson plans will inventively break Overly rigid lesson plans can easily be derailed … I hear about it all the time. Once that happens, teachers are scrambling to get things back on track. The other approach is to use a flexible lesson plan that allows for variability in the classroom: Student misses a few days. Student is talented and moving fast Student is struggling and needs more time School gets cancelled a few days for whatever reasons … A curriculum designed for reality Instead of a set of highly structured lesson plans that can be hard to implement,...
PHP Courses for College in 2017 and 2018
PHP

PHP Courses for College in 2017 and 2018

One of the reasons PHP is a good language to teach server side programming with, is because it is relatively easy to setup a PHP environment on each student’s workstation. With free apps like MAMP and WAMP, you can install a fully functional PHP installation with MySQL, Apache and it comes with an easy to use control panel to manage the servers. With this 1-click install running, students will be able to explore concepts like: web servers database servers http directory and how it impact server side code processing … And more. StudioWeb’s interactive PHP courses teach not only the fundamentals of programming, we also have included key project based courses (crud with PHP, PHP tag cloud) that allow students to see PHP used in a real-world programming context. Teachers benefit from the in...
PHP

GET BETTER ROI ON YOUR WEBSITE TODAY

Every entrepreneur and business owner is familiar with the term ROI. However, when it comes to their business websites they have little or nothing to say when talking about ROI. The overwhelming amount of information in the digital world can trick even the sharpest mind. There seems to be one to many online marketing strategies out there and it can be hard to choose what really works and how to take advantage of it. The pace with which technology advances is incredible and in the last decades, it has gone insane. There is digital innovation everywhere and there is so much of it that we can barely keep up with what is changing within our houses. No one seems to watch TV or play board games anymore. All we hear about in the living room is Netflix, Xbox, and countless different names of apps...
PHP is Server Side Programming’s Rocky!
PHP

PHP is Server Side Programming’s Rocky!

I’ve been writing code since 1994, and have used many programming languages over the years to build commercial apps. Thought PHP was NOT my favorite language, years ago, I came to respect the pragmatic and effective nature of the PHP universe. From day one, with PHP, you just got things done fast. PHP sucks! PHP is old! Funny, PHP is the programming world’s whipping boy. People have been disparaging the language for years and years. And yet, like Rocky Balboa, it just keeps on coming and winning! PHP now powers more websites than any other server side programming language … some estimates say nearly 80%! Consider that the 3 most popular CMS’ are built with PHP (WordPress, Drupal and Joomla) … it stands to reason.Contrast that to the once darling of the nerd-hipster programming world: Ru...
The Critical Job of Testing … in App Development
PHP

The Critical Job of Testing … in App Development

Hi! We are about to lock-down an app’s code base, before moving to a total rewrite from scratch. But before we move on, it is important that the current version be pretty much bug free, and fully functional. … Just in case the new version of the app doesn’t hit deadlines on time. At least we will have a fallback position. Death by last minute changes! So we decided to implement some last little changes to the soon to retired app, and in the process of making these small changes, not so small bugs crept in. That is a symptom of, and one of the reasons we are doing a rewrite – messy old code base. After many years and developers, the code base is just getting a little to creepy to want to mess with. Developers are scared to mess around. Test, test again, and retest! I make it a point to d...