3v4l.org

run code in 300+ PHP versions simultaneously
<?php $points = 10; $rounds = 2; $array['spieler'] = array( array('bez' => 'Punkte', 'wert' => $points), array('bez' => 'Spielrunden', 'wert' => $rounds), ($rounds > 0? array('bez' => 'Punkte pro Runde', 'wert' => $points/$rounds) : array()), ); print_r($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uZqp3
function name:  (null)
number of ops:  23
compiled vars:  !0 = $points, !1 = $rounds, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10
    3     1        ASSIGN                                                   !1, 2
    5     2        INIT_ARRAY                                       ~6      'Punkte', 'bez'
          3        ADD_ARRAY_ELEMENT                                ~6      !0, 'wert'
          4        INIT_ARRAY                                       ~7      ~6
    6     5        INIT_ARRAY                                       ~8      'Spielrunden', 'bez'
          6        ADD_ARRAY_ELEMENT                                ~8      !1, 'wert'
          7        ADD_ARRAY_ELEMENT                                ~7      ~8
    7     8        IS_SMALLER                                               0, !1
          9      > JMPZ                                                     ~9, ->15
         10    >   INIT_ARRAY                                       ~10     'Punkte+pro+Runde', 'bez'
         11        DIV                                              ~11     !0, !1
         12        ADD_ARRAY_ELEMENT                                ~10     ~11, 'wert'
         13        QM_ASSIGN                                        ~12     ~10
         14      > JMP                                                      ->16
    5    15    >   QM_ASSIGN                                        ~12     <array>
         16    >   ADD_ARRAY_ELEMENT                                ~7      ~12
    4    17        ASSIGN_DIM                                               !2, 'spieler'
    5    18        OP_DATA                                                  ~7
    9    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.91 ms | 1395 KiB | 15 Q