Source: www.amitmerchant.com

The get_class() alternative in PHP 8

Category: PHP, javascript

· December 5, 2020 · ⋆ PHP If you’re working with PHP for a while, there might be a good chance that you’d be in need to fetch the class of an object. This could be mostly for debugging purposes.

As you can tell, using get_class on a class object gives us the fully qualified class name (FQCN) for the particular object.

The get_class() alternative in PHP 8 Exciting new features and improvements in PHP 8 Using .htaccess to access environment variables in PHP How to upgrade legacy codebase to use PHP 8.0 features using Rector How to use Attributes and their real-world usage in PHP 8.0 Run or exclude certain tests in PHPUnit The get_class() alternative in PHP 8 Execute code outside of transaction only when it commits in Laravel 8.x Artisan command to connect to the database in CLI in Laravel 8.x Why you should always commit the composer.lock file
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners