3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (version_compare('4.0.0', '4.0.0-beta1', 'lt')) { echo '4.0.0 is lower than 4.0.0-beta1'; } else { echo '4.0.0 is NOT lower than 4.0.0-beta1'; } echo PHP_EOL; if (version_compare('4.0.0', '4.0.0-beta1', 'gt')) { echo '4.0.0 is greater than 4.0.0-beta1'; } else { echo '4.0.0 is NOT greater than 4.0.0-beta1'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
Branch analysis from position: 18
filename:       /in/gnuRN
function name:  (null)
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'version_compare'
          1        SEND_VAL                                                 '4.0.0'
          2        SEND_VAL                                                 '4.0.0-beta1'
          3        SEND_VAL                                                 'lt'
          4        DO_ICALL                                         $0      
          5      > JMPZ                                                     $0, ->8
    5     6    >   ECHO                                                     '4.0.0+is+lower+than+4.0.0-beta1'
    3     7      > JMP                                                      ->9
    9     8    >   ECHO                                                     '4.0.0+is+NOT+lower+than+4.0.0-beta1'
   12     9    >   ECHO                                                     '%0A'
   14    10        INIT_FCALL                                               'version_compare'
         11        SEND_VAL                                                 '4.0.0'
         12        SEND_VAL                                                 '4.0.0-beta1'
         13        SEND_VAL                                                 'gt'
         14        DO_ICALL                                         $1      
         15      > JMPZ                                                     $1, ->18
   16    16    >   ECHO                                                     '4.0.0+is+greater+than+4.0.0-beta1'
   14    17      > JMP                                                      ->19
   20    18    >   ECHO                                                     '4.0.0+is+NOT+greater+than+4.0.0-beta1'
   21    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.09 ms | 1002 KiB | 14 Q