Re: New function proposal

From: Date: Sat, 10 Oct 2015 00:34:20 +0000
Subject: Re: New function proposal
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-88733@lists.php.net to get a copy of this message
I agree with Ben on this, I personally use var_dump();exit; in my code a lot, but there's no reason this needs to be in the core and not in userland: function dd(...$args) { var_dump(...$args); exit; } On Fri, Oct 9, 2015 at 5:24 PM Kris Childress <kris@nivenly.com> wrote: > Mattias, > > As an avid user of var_dump($something); die(); I think this is a > *fabulous* > idea! > > Laravel has a good idea with dd(), I would like to see something that is > quick and easy to type, that we can throw anything at.. Maybe something > similar (basic example) to the following : > > > > function dd($anything) > { > > var_dump(func_get_args()); > > die(1); > > } > > Or something along those lines.. > > What does the gang think? > > > On Thu, Oct 8, 2015 at 9:05 AM, Mattias Gonzalez < > mattiasgonzalez@gmail.com> > wrote: > > > I wanted to propose the "var_die($var)" functionallity. > > My mates and i use a lot var_dump($var);die; > > > > Since die() wont print an array just a string, i think it´ll be very > > useful. > > > > It should do the var_dump($var);and die(); > > > > what do you think? > > > > > > -- > Kris Childress >

« previous php.internals (#88733) next »