3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*************************************************************** * Copyright notice * * (c) 2013 FTI eCom GmbH * All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is * free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ /** * Diese Klasse bereitet die Daten für das Chart auf * * @author Daniel Siekiera <daniel.siekiera@fti-ecom.de> */ class ChartData { /** * Daten die dann auf das Chart kommen * * @var arrays */ public $data; /** * __construct * * Initialfunktion * * @var arrays */ function __construct() { $this->data = new stdClass(); } /** * addCords * * erzeugt ein neues Array für einen Datensatz * * @param string $name * @param array $data * @param string $type * @return void */ public function addCords(string $name, array $data_array = NULL, string $type = NULL){ if(empty($data) && empty($name)) return false; // $data ist ein Array, durchsteppen if(is_array($data)){ foreach($data as $val) $this->data->cords->{$name}->data = (object)$val; } else $this->data->cords->{$name}->data = (object)$data; // Anzahl der Elemente zählen $this->data->cords->{$name}->size = sizeof($data); // das größte Element ermitteln $this->data->cords->{$name}->max = max($data); // das kleinste Element ermitteln $this->data->cords->{$name}->min = min($data); // Default Form festlegen $this->data->cords->{$name}->form = $type; // leere Array definieren $this->data->cords->{$name}->colors = (object)array('bar' => '', 'label' => ''); // leere Array definieren $this->data->cords->{$name}->legend = (object)array('angle' => '', 'font_size' => '', 'font_file' => ''); } }
Output for git.master, git.master_jit, rfc.property-hooks

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:
46.8 ms | 401 KiB | 8 Q