3v4l.org

run code in 300+ PHP versions simultaneously
<?php $versions = [ "3.0.1", "3.0.3", "3.0.2", "3.0.0", "2.9.4", "2.9.3", "2.9.2", "2.9.5", "2.9.1", "2.9.0", "2.8.1", "2.8.11", "2.8.10" ]; foreach ($versions as $version) { $ints = explode('.', $version, 3); $tempKey = "{$ints[0]}.{$ints[1]}"; if (!isset($result[$tempKey]) || version_compare($version, $result[$tempKey], 'gt')) { $result[$tempKey] = $version; } } var_export(array_values($result));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 29
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 29
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 18, Position 2 = 25
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 28
Branch analysis from position: 25
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/emuU9
function name:  (null)
number of ops:  37
compiled vars:  !0 = $versions, !1 = $version, !2 = $ints, !3 = $tempKey, !4 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1      > FE_RESET_R                                       $6      !0, ->29
          2    > > FE_FETCH_R                                               $6, !1, ->29
   10     3    >   INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '.'
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 3
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !2, $7
   11     9        FETCH_DIM_R                                      ~9      !2, 0
         10        ROPE_INIT                                     3  ~12     ~9
         11        ROPE_ADD                                      1  ~12     ~12, '.'
         12        FETCH_DIM_R                                      ~10     !2, 1
         13        ROPE_END                                      2  ~11     ~12, ~10
         14        ASSIGN                                                   !3, ~11
   12    15        ISSET_ISEMPTY_DIM_OBJ                         0  ~15     !4, !3
         16        BOOL_NOT                                         ~16     ~15
         17      > JMPNZ_EX                                         ~16     ~16, ->25
         18    >   INIT_FCALL                                               'version_compare'
         19        SEND_VAR                                                 !1
         20        FETCH_DIM_R                                      ~17     !4, !3
         21        SEND_VAL                                                 ~17
         22        SEND_VAL                                                 'gt'
         23        DO_ICALL                                         $18     
         24        BOOL                                             ~16     $18
         25    > > JMPZ                                                     ~16, ->28
   13    26    >   ASSIGN_DIM                                               !4, !3
         27        OP_DATA                                                  !1
    9    28    > > JMP                                                      ->2
         29    >   FE_FREE                                                  $6
   16    30        INIT_FCALL                                               'var_export'
         31        INIT_FCALL                                               'array_values'
         32        SEND_VAR                                                 !4
         33        DO_ICALL                                         $20     
         34        SEND_VAR                                                 $20
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.75 ms | 1009 KiB | 17 Q