3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hotels = [ ['Cala', 3, 8.7, 6], ['Ocean', 3, 8.2, 6], ['Orchid', 3, 8.0, 7], ['Ya', 3, 8.7, 7], ['Chaba', 3, 8.2, 7], ]; $totalHotelsNumber = 2; $starCoef = 0.2; $ratingCoef = 2; for ( $i=0; $i<count($hotels); $i++ ) { for ( $j=$i; $i<count($hotels); $j++ ) { echo 'Comparing '.$i.' and '.$j."\r\n"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 6
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 6
Branch analysis from position: 21
Branch analysis from position: 6
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
Branch analysis from position: 8
filename:       /in/sGtbF
function name:  (null)
number of ops:  22
compiled vars:  !0 = $hotels, !1 = $totalHotelsNumber, !2 = $starCoef, !3 = $ratingCoef, !4 = $i, !5 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, 2
   13     2        ASSIGN                                                   !2, 0.2
   14     3        ASSIGN                                                   !3, 2
   16     4        ASSIGN                                                   !4, 0
          5      > JMP                                                      ->18
   17     6    >   ASSIGN                                                   !5, !4
          7      > JMP                                                      ->14
   18     8    >   CONCAT                                           ~12     'Comparing+', !4
          9        CONCAT                                           ~13     ~12, '+and+'
         10        CONCAT                                           ~14     ~13, !5
         11        CONCAT                                           ~15     ~14, '%0D%0A'
         12        ECHO                                                     ~15
   17    13        PRE_INC                                                  !5
         14    >   COUNT                                            ~17     !0
         15        IS_SMALLER                                               !4, ~17
         16      > JMPNZ                                                    ~18, ->8
   16    17    >   PRE_INC                                                  !4
         18    >   COUNT                                            ~20     !0
         19        IS_SMALLER                                               !4, ~20
         20      > JMPNZ                                                    ~21, ->6
   20    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.49 ms | 1385 KiB | 13 Q