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+1; $j<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 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 6
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 9
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 6
Branch analysis from position: 22
Branch analysis from position: 6
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 9
Branch analysis from position: 18
Branch analysis from position: 9
filename:       /in/lcr06
function name:  (null)
number of ops:  23
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                                                      ->19
   17     6    >   ADD                                              ~11     !4, 1
          7        ASSIGN                                                   !5, ~11
          8      > JMP                                                      ->15
   18     9    >   CONCAT                                           ~13     'Comparing+', !4
         10        CONCAT                                           ~14     ~13, '+and+'
         11        CONCAT                                           ~15     ~14, !5
         12        CONCAT                                           ~16     ~15, '%0D%0A'
         13        ECHO                                                     ~16
   17    14        PRE_INC                                                  !5
         15    >   COUNT                                            ~18     !0
         16        IS_SMALLER                                               !5, ~18
         17      > JMPNZ                                                    ~19, ->9
   16    18    >   PRE_INC                                                  !4
         19    >   COUNT                                            ~21     !0
         20        IS_SMALLER                                               !4, ~21
         21      > JMPNZ                                                    ~22, ->6
   20    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.14 ms | 1394 KiB | 13 Q