3v4l.org

run code in 300+ PHP versions simultaneously
<?php define("superheroes_spider-man_name", 123456); define("enableIPSLogList", false); //IPSLog mit Liste aller Variablen define("enableIPSLogSet", false); //IPSLog mit Liste aller Variablen die gesetzt wurden define("enableIPSLogMissing", false); //IPSLog mit Liste aller nicht konfigurierten Variablen define("enableEchoList", false); //IPSLog mit Liste aller Variablen define("enableEchoSet", false); //IPSLog mit Liste aller Variablen die gesetzt wurden define("enableEchoMissing", false); //IPSLog mit Liste aller nicht konfigurierten Variablen $superheroes = array( "spider-man" => array( "name" => "Peter Parker", "email" => "peterparker@mail.com", ), "super-man" => array( "name" => "Clark Kent", "email" => "clarkkent@mail.com", ), "iron-man" => array( "name" => "Harry Potter", "email" => "harrypotter@mail.com", "nicknames" => array( "name1" => "HP", "name2" => "Potter", ), "test" => array( "test1" => "test1text", ), ) ); //print_r($superheroes); //Funktion zur Ausgabe von IPSLogs //funcIPSLog(("SENDER"), ("REPORT"), $enableIPSLog); //funcIPSLog(("SENDER"), ("REPORT"), $enableIPSLogMissing); function funcIPSLog($sender, $report, $check) { if($check) { IPS_LogMessage($sender, $report); } } //funcEcho(("MESSAGE"), $enableEchoMissing); function funcEcho($message, $check) { if($check) { echo ($message); } } //setVariables_fromArray($array, "prefix"); function setVariables_fromArray($array, $name) { forEach($array as $index => $item) { if(is_Array($item)) { $nameAltered = $name . "_" . $index; funcIPSLog(("=========="), ("=========="), enableIPSLog); funcIPSLog(("ARRAY HEAD"), ($nameAltered), enableIPSLog); funcEcho(("==========\n"), enableEchoLog); funcEcho(("ARRAY HEAD: '$nameAltered' \n"), enableEchoLog); setVariables_fromArray($item, $nameAltered); } else { $nameVariable = $name . "_" . $index; //funcIPSLog(("VARIABLE: " . $nameVariable), ("Value: " . $item), enableIPSLogList); funcEcho(("VARIABLE: '$nameVariable' VALUE: '$item' \n"), enableEchoList); if(defined($nameVariable)) { //SetValueFloat(${$nameVariable}, $item); funcIPSLog(("SET: "), ("Die Variable '$nameVariable' mit dem Wert '$item' wurde gesetzt. \n"), enableIPSLogSet); funcEcho(("SET: Die Variable '$nameVariable' mit dem Wert '$item' wurde gesetzt. \n"), enableEchoSet); } else { funcIPSLog(("!!Meldung NetAtmo:"), ("Die Variable " . $nameVariable . " mit dem Wert " . $item . " ist nicht konfiguriert."), enableIPSLogMissing); funcEcho(("!! NetAtmo MELDUNG: Die Variable '$nameVariable' mit dem Wert '$item' ist nicht konfiguriert. \n"), enableEchoMissing); } } } } setVariables_fromArray($superheroes, "superheroes"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZRPs5
function name:  (null)
number of ops:  34
compiled vars:  !0 = $superheroes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'superheroes_spider-man_name'
          2        SEND_VAL                                                 123456
          3        DO_ICALL                                                 
    6     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'enableIPSLogList'
          6        SEND_VAL                                                 <false>
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'define'
          9        SEND_VAL                                                 'enableIPSLogSet'
         10        SEND_VAL                                                 <false>
         11        DO_ICALL                                                 
    8    12        INIT_FCALL                                               'define'
         13        SEND_VAL                                                 'enableIPSLogMissing'
         14        SEND_VAL                                                 <false>
         15        DO_ICALL                                                 
    9    16        INIT_FCALL                                               'define'
         17        SEND_VAL                                                 'enableEchoList'
         18        SEND_VAL                                                 <false>
         19        DO_ICALL                                                 
   10    20        INIT_FCALL                                               'define'
         21        SEND_VAL                                                 'enableEchoSet'
         22        SEND_VAL                                                 <false>
         23        DO_ICALL                                                 
   11    24        INIT_FCALL                                               'define'
         25        SEND_VAL                                                 'enableEchoMissing'
         26        SEND_VAL                                                 <false>
         27        DO_ICALL                                                 
   14    28        ASSIGN                                                   !0, <array>
   83    29        INIT_FCALL                                               'setvariables_fromarray'
         30        SEND_VAR                                                 !0
         31        SEND_VAL                                                 'superheroes'
         32        DO_FCALL                                      0          
   85    33      > RETURN                                                   1

Function funcipslog:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/ZRPs5
function name:  funcIPSLog
number of ops:  9
compiled vars:  !0 = $sender, !1 = $report, !2 = $check
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   42     3      > JMPZ                                                     !2, ->8
   43     4    >   INIT_FCALL_BY_NAME                                       'IPS_LogMessage'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
   45     8    > > RETURN                                                   null

End of function funcipslog

Function funcecho:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/ZRPs5
function name:  funcEcho
number of ops:  5
compiled vars:  !0 = $message, !1 = $check
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   48     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   49     2      > JMPZ                                                     !1, ->4
   50     3    >   ECHO                                                     !0
   52     4    > > RETURN                                                   null

End of function funcecho

Function setvariables_fromarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 100
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 100
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 40
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 99
Branch analysis from position: 99
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 79
Branch analysis from position: 57
1 jumps found. (Code = 42) Position 1 = 99
Branch analysis from position: 99
Branch analysis from position: 79
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 100
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 100
filename:       /in/ZRPs5
function name:  setVariables_fromArray
number of ops:  102
compiled vars:  !0 = $array, !1 = $name, !2 = $item, !3 = $index, !4 = $nameAltered, !5 = $nameVariable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   57     2      > FE_RESET_R                                       $6      !0, ->100
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->100
          4    >   ASSIGN                                                   !3, ~7
   58     5        TYPE_CHECK                                  128          !2
          6      > JMPZ                                                     ~9, ->40
   59     7    >   CONCAT                                           ~10     !1, '_'
          8        CONCAT                                           ~11     ~10, !3
          9        ASSIGN                                                   !4, ~11
   60    10        INIT_FCALL                                               'funcipslog'
         11        SEND_VAL                                                 '%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D'
         12        SEND_VAL                                                 '%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D'
         13        FETCH_CONSTANT                                   ~13     'enableIPSLog'
         14        SEND_VAL                                                 ~13
         15        DO_FCALL                                      0          
   61    16        INIT_FCALL                                               'funcipslog'
         17        SEND_VAL                                                 'ARRAY+HEAD'
         18        SEND_VAR                                                 !4
         19        FETCH_CONSTANT                                   ~15     'enableIPSLog'
         20        SEND_VAL                                                 ~15
         21        DO_FCALL                                      0          
   62    22        INIT_FCALL                                               'funcecho'
         23        SEND_VAL                                                 '%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A'
         24        FETCH_CONSTANT                                   ~17     'enableEchoLog'
         25        SEND_VAL                                                 ~17
         26        DO_FCALL                                      0          
   63    27        INIT_FCALL                                               'funcecho'
         28        ROPE_INIT                                     3  ~20     'ARRAY+HEAD%3A+%27'
         29        ROPE_ADD                                      1  ~20     ~20, !4
         30        ROPE_END                                      2  ~19     ~20, '%27+%0A'
         31        SEND_VAL                                                 ~19
         32        FETCH_CONSTANT                                   ~22     'enableEchoLog'
         33        SEND_VAL                                                 ~22
         34        DO_FCALL                                      0          
   64    35        INIT_FCALL_BY_NAME                                       'setVariables_fromArray'
         36        SEND_VAR_EX                                              !2
         37        SEND_VAR_EX                                              !4
         38        DO_FCALL                                      0          
         39      > JMP                                                      ->99
   67    40    >   CONCAT                                           ~25     !1, '_'
         41        CONCAT                                           ~26     ~25, !3
         42        ASSIGN                                                   !5, ~26
   69    43        INIT_FCALL                                               'funcecho'
         44        ROPE_INIT                                     5  ~29     'VARIABLE%3A+%27'
         45        ROPE_ADD                                      1  ~29     ~29, !5
         46        ROPE_ADD                                      2  ~29     ~29, '%27+VALUE%3A+%27'
         47        ROPE_ADD                                      3  ~29     ~29, !2
         48        ROPE_END                                      4  ~28     ~29, '%27+%0A'
         49        SEND_VAL                                                 ~28
         50        FETCH_CONSTANT                                   ~32     'enableEchoList'
         51        SEND_VAL                                                 ~32
         52        DO_FCALL                                      0          
   70    53        INIT_FCALL                                               'defined'
         54        SEND_VAR                                                 !5
         55        DO_ICALL                                         $34     
         56      > JMPZ                                                     $34, ->79
   72    57    >   INIT_FCALL                                               'funcipslog'
         58        SEND_VAL                                                 'SET%3A+'
         59        ROPE_INIT                                     5  ~36     'Die+Variable+%27'
         60        ROPE_ADD                                      1  ~36     ~36, !5
         61        ROPE_ADD                                      2  ~36     ~36, '%27+mit+dem+Wert+%27'
         62        ROPE_ADD                                      3  ~36     ~36, !2
         63        ROPE_END                                      4  ~35     ~36, '%27+wurde+gesetzt.+%0A'
         64        SEND_VAL                                                 ~35
         65        FETCH_CONSTANT                                   ~39     'enableIPSLogSet'
         66        SEND_VAL                                                 ~39
         67        DO_FCALL                                      0          
   73    68        INIT_FCALL                                               'funcecho'
         69        ROPE_INIT                                     5  ~42     'SET%3A+Die+Variable+%27'
         70        ROPE_ADD                                      1  ~42     ~42, !5
         71        ROPE_ADD                                      2  ~42     ~42, '%27+mit+dem+Wert+%27'
         72        ROPE_ADD                                      3  ~42     ~42, !2
         73        ROPE_END                                      4  ~41     ~42, '%27+wurde+gesetzt.+%0A'
         74        SEND_VAL                                                 ~41
         75        FETCH_CONSTANT                                   ~45     'enableEchoSet'
         76        SEND_VAL                                                 ~45
         77        DO_FCALL                                      0          
         78      > JMP                                                      ->99
   76    79    >   INIT_FCALL                                               'funcipslog'
         80        SEND_VAL                                                 '%21%21Meldung+NetAtmo%3A'
         81        CONCAT                                           ~47     'Die+Variable+', !5
         82        CONCAT                                           ~48     ~47, '+mit+dem+Wert+'
         83        CONCAT                                           ~49     ~48, !2
         84        CONCAT                                           ~50     ~49, '+ist+nicht+konfiguriert.'
         85        SEND_VAL                                                 ~50
         86        FETCH_CONSTANT                                   ~51     'enableIPSLogMissing'
         87        SEND_VAL                                                 ~51
         88        DO_FCALL                                      0          
   77    89        INIT_FCALL                                               'funcecho'
         90        ROPE_INIT                                     5  ~54     '%21%21+NetAtmo+MELDUNG%3A+Die+Variable+%27'
         91        ROPE_ADD                                      1  ~54     ~54, !5
         92        ROPE_ADD                                      2  ~54     ~54, '%27+mit+dem+Wert+%27'
         93        ROPE_ADD                                      3  ~54     ~54, !2
         94        ROPE_END                                      4  ~53     ~54, '%27+ist+nicht+konfiguriert.+%0A'
         95        SEND_VAL                                                 ~53
         96        FETCH_CONSTANT                                   ~57     'enableEchoMissing'
         97        SEND_VAL                                                 ~57
         98        DO_FCALL                                      0          
   57    99    > > JMP                                                      ->3
        100    >   FE_FREE                                                  $6
   81   101      > RETURN                                                   null

End of function setvariables_fromarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.94 ms | 1411 KiB | 27 Q