3v4l.org

run code in 500+ PHP versions simultaneously
<?php $test1 = $test2 = $test3 = $test4 = 0; foreach(range(1 , 100) as $row) { $rand = rand(1,4); ${'test'.$rand}++; } var_dump($test1 , $test2 , $test3 , $test4);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/fQXWn
function name:  (null)
number of ops:  27
compiled vars:  !0 = $test1, !1 = $test2, !2 = $test3, !3 = $test4, !4 = $row, !5 = $rand
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                               ~6      !3, 0
          1        ASSIGN                                               ~7      !2, ~6
          2        ASSIGN                                               ~8      !1, ~7
          3        ASSIGN                                                       !0, ~8
    5     4        INIT_FCALL                                                   'range'
          5        SEND_VAL                                                     1
          6        SEND_VAL                                                     100
          7        DO_ICALL                                             $10     
          8      > FE_RESET_R                                           $11     $10, ->19
          9    > > FE_FETCH_R                                                   $11, !4, ->19
    7    10    >   INIT_FCALL                                                   'rand'
         11        SEND_VAL                                                     1
         12        SEND_VAL                                                     4
         13        DO_ICALL                                             $12     
         14        ASSIGN                                                       !5, $12
    8    15        CONCAT                                               ~14     'test', !5
         16        FETCH_RW                         local               $15     ~14
         17        PRE_INC                                                      $15
    5    18      > JMP                                                          ->9
         19    >   FE_FREE                                                      $11
   11    20        INIT_FCALL                                                   'var_dump'
         21        SEND_VAR                                                     !0
         22        SEND_VAR                                                     !1
         23        SEND_VAR                                                     !2
         24        SEND_VAR                                                     !3
         25        DO_ICALL                                                     
         26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.15 ms | 1417 KiB | 16 Q