> This request seems to be more in the realm of having XPath type support for
> arrays, likewise people have also attempted to do this with JSON. It does
> seem like it could be valuable to some degree, however, I don't necessarily
> believe it belongs in the core. This seems much better for a PE
In every project I have worked on in the last few years, I've
implemented this. If I have an array that I can't be sure is well
formed and need to get a value at any depth without triggering
expensive notices, the recommended way today is to check if each value
is set and is an array:
http://3v4l.o
On Tue, Oct 7, 2014 at 12:15 PM, Johannes Schlüter
wrote:
> On Tue, 2014-10-07 at 17:05 +0100, Mathias Grimm wrote:
> > Hi,
> > I would like to suggest something for php like a class I am using
> >
> > https://github.com/mathiasgrimm/arraypath
> >
> > The reason is to access arrays like this:
> >
Am 07.10.2014 um 18:05 schrieb Mathias Grimm :
> Hi,
> I would like to suggest something for php like a class I am using
>
> https://github.com/mathiasgrimm/arraypath
>
> The reason is to access arrays like this:
>
> $idx3 = ArrayPath::get('idx1/idx2/idx3', $_POST, 'myDefaultValue');
>
>
> Re
On Tue, 2014-10-07 at 17:05 +0100, Mathias Grimm wrote:
> Hi,
> I would like to suggest something for php like a class I am using
>
> https://github.com/mathiasgrimm/arraypath
>
> The reason is to access arrays like this:
>
> $idx3 = ArrayPath::get('idx1/idx2/idx3', $_POST, 'myDefaultValue');
w
For international user this makes more sense because the "'" or the '"' are
sensitive keys that needs two interactions instead of just one...
so for typing something like $_POST['asasdasd']['asdasd']['asdasd'] is
sometimes a bit annoying but it could be solved having 2 keyboard layouts
(my case)
A
Great! That solves 75% of the problem.
Still accessing index using "/" (or other separator) would be very handy
$c = $_POST::path('a/b/c', 'def')
$c = $_POST::('a/b/c', 'def')
$c = $_POST@('a/b/c', 'def')
$c = $_POST::at('a/b/c', 'def')
I am not really creative now, but the part I would like to
On Tue, Oct 7, 2014 at 9:05 AM, Mathias Grimm
wrote:
> Hi,
> I would like to suggest something for php like a class I am using
>
> https://github.com/mathiasgrimm/arraypath
>
> The reason is to access arrays like this:
>
> $idx3 = ArrayPath::get('idx1/idx2/idx3', $_POST, 'myDefaultValue');
>
>
>
This is handy just for programmers using recommended php.ini settings for
development (error_reporting = E_ALL and display_errors = On).
People using @, display_errors = Off or any other sort of sorcery don't
have such problems.
On Tue, Oct 7, 2014 at 5:14 PM, Mathias Grimm
wrote:
> default val
default value and existence of index checking.
I not a huge change, its a good change and very handy.
array(
'basicInformation' => array(
'name'=> 'Mathias',
'surname' => 'Grimm'
),
));
// normal php way$sName=
isset($post['user']['basicInforma
Hi!
How is it better than:
$idx3 = $_POST['idx1']['idx2']['idx3'];
?
Regards,
Florian Margaine
Le 7 oct. 2014 18:05, "Mathias Grimm" a écrit :
> Hi,
> I would like to suggest something for php like a class I am using
>
> https://github.com/mathiasgrimm/arraypath
>
> The reason is to access ar
Hi,
I would like to suggest something for php like a class I am using
https://github.com/mathiasgrimm/arraypath
The reason is to access arrays like this:
$idx3 = ArrayPath::get('idx1/idx2/idx3', $_POST, 'myDefaultValue');
Regards,
Mathias
12 matches
Mail list logo