Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php $collection1 = \Vtiful\Kernel\Collection::init([ ['product_id' => 'prod-100', '..
Decoded Output download
<?php
$collection1 = \Vtiful\Kernel\Collection::init([
['product_id' => 'prod-100', 'name' => 'Desk'],
['product_id' => 'prod-200', 'name' => 'Chair'],
]);
$keyed1 = $collection1->keyBy('product_id');
$collection2 = \Vtiful\Kernel\Collection::init([
['product_id' => 'prod-100', 'name' => 'Desk'],
['product_id' => 'prod-200', 'name' => 'Chair'],
]);
$keyed2 = $collection2->keyBy(function ($item) {
return strtoupper($item['product_id']);
});
var_dump($keyed1, $keyed2); ?>
Did this file decode correctly?
Original Code
<?php
$collection1 = \Vtiful\Kernel\Collection::init([
['product_id' => 'prod-100', 'name' => 'Desk'],
['product_id' => 'prod-200', 'name' => 'Chair'],
]);
$keyed1 = $collection1->keyBy('product_id');
$collection2 = \Vtiful\Kernel\Collection::init([
['product_id' => 'prod-100', 'name' => 'Desk'],
['product_id' => 'prod-200', 'name' => 'Chair'],
]);
$keyed2 = $collection2->keyBy(function ($item) {
return strtoupper($item['product_id']);
});
var_dump($keyed1, $keyed2);
Function Calls
None |
Stats
MD5 | 4c089c731c52734a5668ed0ea89a64d6 |
Eval Count | 0 |
Decode Time | 83 ms |