PHP Return, Declare & Tickable Statements - Full PHP 8 Tutorial @ProgramWithGio
PHP Return, Declare & Tickable Statements - Full PHP 8 Tutorial  @ProgramWithGio
Uploaded January 2021 | Updated November 2026, 3 hours ago
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: php.net/manual/en/control-structures.goto.php

SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
👍 Smash the like button
🤝 Subscribe to the channel & turn the notifications on
💬 Post comments, any feedback is greatly appreciated
⭐ Become a Patreon: patreon.com/programwithgio
THANK YOU!

LESSON 1.19
Course Outline - github.com/ggelashvili/learnphptherightway-outline
Course Playlist - youtube.com/playlist?list=PLr3d3QYzkw2xabQRUpcZ_IBk9W50M9pe-

RESOURCES
Check php.net/manual/en/control-structures.match.php for more info about match expression.

CHAPTERS
00:00 - Return statement
01:41 - Declare statement (ticks directive)
03:22 - Declare statement (encoding directive)
03:43 - Declare statement (strict_types directive)
05:45 - Goto statement
PHP Return, Declare & Tickable Statements - Full PHP 8 TutorialPHP Sessions & Cookies - Output Buffering - Headers Already Sent Warning - Full PHP 8 TutorialHow To Deploy Vanilla PHP To Cloudways - Full PHP 8 TutorialDependency Injection Container With & Without Reflection API Autowiring - Full PHP 8 TutorialChannel Plans For 2023 - Will There Be A Learn Laravel The Right Way Series?How To Install Xdebug 3 with Docker & PhpStorm - Full PHP 8 TutorialVariable, Anonymous, Callable, Closure & Arrow Functions In PHP - Full PHP 8 TutorialCSRF Explained - What Is Cross Site Request Forgery - Build Expense Tracker App With PHP 8PHP Unit Testing - PHPUnit Tutorial - Full PHP 8 TutorialPHP String Data Type - Heredoc & Nowdoc Syntax - Full PHP 8 TutorialLaravel Breeze Demo - Simple Laravel Starter With AuthenticationHow to Schedule Emails in PHP - Run Automated Scripts Using CRON - Full PHP 8 Tutorial
Program With Gio |

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

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER