@ 2015-09-09T16:07:11Z <?php
$a = [
1 => [
[
'key' => 'fe',
'name' => 'En plantilla a dedicación completa',
'dedication' => self::FULLTIME,
'relationship' => self::EMPLOYEE
],
[
'key' => 'ff',
'name' => 'Freelance a dedicación completa',
'dedication' => self::FULLTIME,
'relationship' => self::FREELANCER
],
],
2 => [
[
'name' => 'En Plantilla',
'childs' => [
[
'key' => 'pem',
'name' => 'Mañanas',
'dedication' => self::PARTTIME,
'relationship' => self::EMPLOYEE,
'shiftPreference' => self::MORNING_SHIFT
],
[
'key' => 'pea',
'name' => 'Tardes',
'dedication' => self::PARTTIME,
'relationship' => self::EMPLOYEE,
'shiftPreference' => self::AFTERNOON_SHIFT
],
[
'key' => 'ped',
'name' => 'Indistinto',
'dedication' => self::PARTTIME,
'relationship' => self::EMPLOYEE,
'shiftPreference' => self::DOES_NOT_MATTER
],
],
],
[
'name' => 'Freelance',
'childs' => [
[
'name' => 'Mañanas',
'childs' => [
[
'key' => 'pfmm',
'name' => 'Más de 3 horas/día',
'dedication' => self::PARTTIME,
'relationship' => self::FREELANCER,
'shiftPreference' => self::MORNING_SHIFT,
'hoursOfService' => self::MORE_THAN_3H
],
[
'key' => 'pfml',
'name' => 'Menos de 3 horas/día',
'parent' => 8,
'dedication' => self::PARTTIME,
'relationship' => self::FREELANCER,
'shiftPreference' => self::MORNING_SHIFT,
'hoursOfService' => self::LESS_THAN_3H
],
],
],
[
'name' => 'Tardes',
'childs' => [
[
'key' => 'pfam',
'name' => 'Más de 3 horas/día',
'dedication' => self::PARTTIME,
'relationship' => self::FREELANCER,
'shiftPreference' => self::AFTERNOON_SHIFT,
'hoursOfService' => self::MORE_THAN_3H
],
[
'key' => 'pfal',
'name' => 'Menos de 3 horas/día',
'dedication' => self::PARTTIME,
'relationship' => self::FREELANCER,
'shiftPreference' => self::AFTERNOON_SHIFT,
'hoursOfService' => self::LESS_THAN_3H
],
],
],
[
'name' => 'Indistinto',
'childs' => [
[
'key' => 'pfdm',
'name' => 'Más de 3 horas/día',
'dedication' => self::PARTTIME,
'relationship' => self::FREELANCER,
'shiftPreference' => self::DOES_NOT_MATTER,
'hoursOfService' => self::MORE_THAN_3H
],
[
'key' => 'pfdl',
'name' => 'Menos de 3 horas/día',
'dedication' => self::PARTTIME,
'relationship' => self::FREELANCER,
'shiftPreference' => self::DOES_NOT_MATTER,
'hoursOfService' => self::LESS_THAN_3H
],
],
],
],
],
],
];
$results = $a[1];
array_walk_recursive($results, function(&$a){
unset($a['dedication'], $a['relationship'], $a['shiftPreference'], $a['hoursOfService']);
});
var_dump($results);
var_dump($a);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for git.master , git.master_jit , rfc.property-hooks Fatal error: Uncaught Error: Cannot access "self" when no class scope is active in /in/OHq93:7
Stack trace:
#0 {main}
thrown in /in/OHq93 on line 7
Process exited with code 255 . This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches Archived branches Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
preferences:dark mode live preview
29.8 ms | 401 KiB | 8 Q