3v4l.org

run code in 300+ PHP versions simultaneously
<?php $versions = array( '1', '1.0', '1.01', '1.1', '1.10', '1.10b', '1.10.0', ); $comps = array( -1 => 'lt', 0 => 'eq', 1 => 'gt' ); foreach ($versions as $version) { if (isset($last)) { $comp = version_compare($last, $version); echo str_pad($last,8,' ',STR_PAD_LEFT) . " {$comps[$comp]} {$version}\n"; } $last = $version; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 27
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 27
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 25
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 25
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/MbUtN
function name:  (null)
number of ops:  29
compiled vars:  !0 = $versions, !1 = $comps, !2 = $version, !3 = $last, !4 = $comp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        ASSIGN                                                   !1, <array>
   19     2      > FE_RESET_R                                       $7      !0, ->27
          3    > > FE_FETCH_R                                               $7, !2, ->27
   20     4    >   ISSET_ISEMPTY_CV                                         !3
          5      > JMPZ                                                     ~8, ->25
   21     6    >   INIT_FCALL                                               'version_compare'
          7        SEND_VAR                                                 !3
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !4, $9
   22    11        INIT_FCALL                                               'str_pad'
         12        SEND_VAR                                                 !3
         13        SEND_VAL                                                 8
         14        SEND_VAL                                                 '+'
         15        SEND_VAL                                                 0
         16        DO_ICALL                                         $11     
         17        ROPE_INIT                                     5  ~14     '+'
         18        FETCH_DIM_R                                      ~12     !1, !4
         19        ROPE_ADD                                      1  ~14     ~14, ~12
         20        ROPE_ADD                                      2  ~14     ~14, '+'
         21        ROPE_ADD                                      3  ~14     ~14, !2
         22        ROPE_END                                      4  ~13     ~14, '%0A'
         23        CONCAT                                           ~17     $11, ~13
         24        ECHO                                                     ~17
   24    25    >   ASSIGN                                                   !3, !2
   19    26      > JMP                                                      ->3
         27    >   FE_FREE                                                  $7
   25    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.4 ms | 1396 KiB | 17 Q