Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Meenachinmaylaracasts's avatar

array_except() is deprecated in laravel 5.8???

On this platform, in the project series of birdboard in laravel 5.7, please note that in the episode may be 25 or 26, sir used a helper method array_except(), this is a method to avoiding some key value pair data. but in laravel 5.8 this method is deprecated so now you can use Arr::except(), arguments and function is the same but different way to use.

array_except() => Arr::except() .......... :)

Thank you.

0 likes
4 replies
jlrdw's avatar
$filtered = array_except($array, ['price']);
$filtered = Arr::except($array, ['price']);

Looks basically the same.

Looks like newer version is using a facade.

1 like
Meenachinmaylaracasts's avatar

@JLRDW - totally true. i have mentioned that, it is a new version of using it but function is same. just like very soon we gonna have a new UI for Laracasts in 2019. Haha...

Thanks for watching and reply.

Please or to participate in this conversation.