Free and Premium
News, Cheatsheets and Lectures
Bright and colorful illustrations. Regularly updates and new illustrations for your user interfaces and other projects
Conclusion
Thank you to all my students who’ve participated in this course and taken the time out to review all the lectures, I always appreciate constructive criticism and positive feedback. There’s a lot to discover and understand with this course and…
PHP7 Depricated features
With the addition of every language there usually is a division with most people on whether some features should be kept for legacy code or removed due to bad habits. I personally think the developers of today love legacy code…
Revamped regular expression function
Sometimes we work with string data to attain more information. For example there are spam filters that need to check whether a comment doesn’t contain certain ‘key phrases’ for advertising or spam. There are also lots of other reasons why…
Random bytes and random int functions
Random is actually a very hard process, human beings may think their random but really we aren’t and computers likewise are not as random. However there are some good algorithms to generate random numbers and strings for encryption or authentication…
Session start options
When you want to start a session we use the session start function which now accepts an associative array as the first parameter. The key is the option you would like to set and the value of the key is…
Integer division
The new intdiv function allows us to do integer divisions and return the amount of successful divides. For example a we could have 10 integer divide by 3. Well we know that three doesn’t go into ten exactly, but we…
PHP7 Generator new features
Firstly lets look at return statements which in a generator function must be the last statement within the generator function. So for example… function gen( ){ yield 100; yield 200; yield 300; return 400; } … Now we want to…
Generators Yielding DataTypes
Now lets review what datatypes can be yielded back. Just before we do, lets review how we can invoke the generator function. Lets say I want a self driving car that’ll continue at each stop sign until it reaches the…
Generator Yielding Values
Generators have the ability to values yield a lot like return statements, allowing the use of value’s outside the functions’ execution context. But yielding out values is what we’ve already discovered but now we want to yield in values which…
Generator Syntax
We’ve discovered generator functions allow you to pause and give way to other processing providing flexibility in programming. Now lets delve into the syntax to see how to create a simple generator function: function satNav( ) { $distance = 0;…
What are Generators?
Generator functions are a new way of programming. They allow us to control the execution of a function and even change the state of the function in mid execution. I’ll compare the generator function with a simple analogy; the traffic…
PHP Namespace’s & group use declarations
When it comes to large scale applications we need to make sure we don’t have conflicting class, function and constant name’s, otherwise we could end up stepping on our own toes. The danger is if we overwrite our classes in…