PHP Return, Declare & Tickable Statements - Full PHP 8 Tutorial

9 Views
Published
In this PHP tutorial, you will learn about the declare & return statements. When the return is used within a function it stops the execution of the function & returns the value of the expression it's given, if no expression is given it will return null. If the return is used in the global scope (out of a function) then the execution of that script will end & will return the value of the expression or null if no expression is given. Declare statement is used to set execution directives, there are three directives: ticks directive, encoding directive & strict_types directive.

The reason I did not talk about the goto statement is that it just makes code harder to maintain & read. You can use other control structures to achieve the same result. If you still want to know how to use it, here is the link to the docs: https://www.php.net/manual/en/control-structures.goto.php

SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
Category
Program With Gio
Tags
php8, learn php, php tutorial
Be the first to comment