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?
If you and your friends use that a lot, how about you just define a
function for it in userland? There's absolutely no logical reason to
have this in core.
function var_die($value) { var_dump($value); exit; }
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?
--
Ben Scholzen 'DASPRiD'
Community Review Team Member | mail@dasprids.de
Zend Framework | http://www.dasprids.de
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
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;
}
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
I think this is the most awesomest fantastical idea since sliced bread.
+~0
On Thu, Oct 8, 2015 at 11: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?
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?
I think we easily achieve the same ends (efficiency in manual debugging)
without adding functions to PHP. For example, I have shortcuts in my
editor to insert the code to:
- dump with or without HTML formatting
- dump and die
- eval(\Psy\sh());
Even in difficult environments like live remote debugging in a term this
is usually feasible. Only very old editors can't cope (e.g. heirloom vi)
and then there are other options to send configured strings.
A carpenter knows how to use tools.
Tom
I wanted to propose the "var_die($var)" functionallity.
This can easily be done in userland. There is no relevant performance
gain. I see no reason to add this to core.
Having this in your userland library has the benefit that you can do
exactly what you need. A general function needs a way to set a return
code (for CLI usage), configuration to wrap output in <pre> or similar.
johannes
Thanks all for the responses!
I agree that it isnt a core functionallity, but it would be nice to have it
always there to use.
thank you for thinking its a good idea guys!
2015-10-10 17:22 GMT-03:00 Johannes Schlüter johannes@schlueters.de:
I wanted to propose the "var_die($var)" functionallity.
This can easily be done in userland. There is no relevant performance
gain. I see no reason to add this to core.Having this in your userland library has the benefit that you can do
exactly what you need. A general function needs a way to set a return
code (for CLI usage), configuration to wrap output in <pre> or similar.johannes