if you use laravel framework, you can use this function to dump the variable if the condition is true.
// config/app.php
'providers' => [
...
AhmetBarut\LaravelHelper\LaravelHelperServiceProvider::class,
];
@dd_if(true, $var1, $var2, $var3);
if use only php, you can use this function to dump the variable if the condition is true.
dd_if(true, $var1, $var2, $var3);