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' => ''); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rlMvj
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   92     0  E > > RETURN                                                   1

Class ChartData:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rlMvj
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   47     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'data'
          3        OP_DATA                                                  $1
   48     4      > RETURN                                                   null

End of function __construct

Function addcords:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 22
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/rlMvj
function name:  addCords
number of ops:  68
compiled vars:  !0 = $name, !1 = $data_array, !2 = $type, !3 = $data, !4 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   60     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      null
   61     3        ISSET_ISEMPTY_CV                                 ~5      !3
          4      > JMPZ_EX                                          ~5      ~5, ->7
          5    >   ISSET_ISEMPTY_CV                                 ~6      !0
          6        BOOL                                             ~5      ~6
          7    > > JMPZ                                                     ~5, ->9
   62     8    > > RETURN                                                   <false>
   65     9    >   TYPE_CHECK                                  128          !3
         10      > JMPZ                                                     ~7, ->22
   66    11    > > FE_RESET_R                                       $8      !3, ->20
         12    > > FE_FETCH_R                                               $8, !4, ->20
   67    13    >   CAST                                          8  ~13     !4
         14        FETCH_OBJ_W                                      $9      'data'
         15        FETCH_OBJ_W                                      $10     $9, 'cords'
         16        FETCH_OBJ_W                                      $11     $10, !0
         17        ASSIGN_OBJ                                               $11, 'data'
         18        OP_DATA                                                  ~13
   66    19      > JMP                                                      ->12
         20    >   FE_FREE                                                  $8
         21      > JMP                                                      ->28
   70    22    >   CAST                                          8  ~18     !3
         23        FETCH_OBJ_W                                      $14     'data'
         24        FETCH_OBJ_W                                      $15     $14, 'cords'
         25        FETCH_OBJ_W                                      $16     $15, !0
         26        ASSIGN_OBJ                                               $16, 'data'
         27        OP_DATA                                                  ~18
   73    28    >   COUNT                                            ~23     !3
         29        FETCH_OBJ_W                                      $19     'data'
         30        FETCH_OBJ_W                                      $20     $19, 'cords'
         31        FETCH_OBJ_W                                      $21     $20, !0
         32        ASSIGN_OBJ                                               $21, 'size'
         33        OP_DATA                                                  ~23
   76    34        INIT_FCALL                                               'max'
         35        SEND_VAR                                                 !3
         36        DO_ICALL                                         $28     
         37        FETCH_OBJ_W                                      $24     'data'
         38        FETCH_OBJ_W                                      $25     $24, 'cords'
         39        FETCH_OBJ_W                                      $26     $25, !0
         40        ASSIGN_OBJ                                               $26, 'max'
         41        OP_DATA                                                  $28
   79    42        INIT_FCALL                                               'min'
         43        SEND_VAR                                                 !3
         44        DO_ICALL                                         $33     
         45        FETCH_OBJ_W                                      $29     'data'
         46        FETCH_OBJ_W                                      $30     $29, 'cords'
         47        FETCH_OBJ_W                                      $31     $30, !0
         48        ASSIGN_OBJ                                               $31, 'min'
         49        OP_DATA                                                  $33
   82    50        FETCH_OBJ_W                                      $34     'data'
         51        FETCH_OBJ_W                                      $35     $34, 'cords'
         52        FETCH_OBJ_W                                      $36     $35, !0
         53        ASSIGN_OBJ                                               $36, 'form'
         54        OP_DATA                                                  !2
   85    55        CAST                                          8  ~42     <array>
         56        FETCH_OBJ_W                                      $38     'data'
         57        FETCH_OBJ_W                                      $39     $38, 'cords'
         58        FETCH_OBJ_W                                      $40     $39, !0
         59        ASSIGN_OBJ                                               $40, 'colors'
         60        OP_DATA                                                  ~42
   88    61        CAST                                          8  ~47     <array>
         62        FETCH_OBJ_W                                      $43     'data'
         63        FETCH_OBJ_W                                      $44     $43, 'cords'
         64        FETCH_OBJ_W                                      $45     $44, !0
         65        ASSIGN_OBJ                                               $45, 'legend'
         66        OP_DATA                                                  ~47
   91    67      > RETURN                                                   null

End of function addcords

End of class ChartData.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.85 ms | 1409 KiB | 17 Q