3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( 'mixed', version_compare('9.0', '8.0.0', '>'), version_compare('8.0.0-beta1', '8.0-alpha12', '>') ); var_dump( 'semver', version_compare('9.0.0', '8.0.0', '>'), version_compare('8.0.0-beta1', '8.0.0-alpha12', '>') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E2GgF
function name:  (null)
number of ops:  31
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
    3     1        SEND_VAL                                                 'mixed'
    4     2        INIT_FCALL                                               'version_compare'
          3        SEND_VAL                                                 '9.0'
          4        SEND_VAL                                                 '8.0.0'
          5        SEND_VAL                                                 '%3E'
          6        DO_ICALL                                         $0      
          7        SEND_VAR                                                 $0
    5     8        INIT_FCALL                                               'version_compare'
          9        SEND_VAL                                                 '8.0.0-beta1'
         10        SEND_VAL                                                 '8.0-alpha12'
         11        SEND_VAL                                                 '%3E'
         12        DO_ICALL                                         $1      
         13        SEND_VAR                                                 $1
         14        DO_ICALL                                                 
    7    15        INIT_FCALL                                               'var_dump'
    8    16        SEND_VAL                                                 'semver'
    9    17        INIT_FCALL                                               'version_compare'
         18        SEND_VAL                                                 '9.0.0'
         19        SEND_VAL                                                 '8.0.0'
         20        SEND_VAL                                                 '%3E'
         21        DO_ICALL                                         $3      
         22        SEND_VAR                                                 $3
   10    23        INIT_FCALL                                               'version_compare'
         24        SEND_VAL                                                 '8.0.0-beta1'
         25        SEND_VAL                                                 '8.0.0-alpha12'
         26        SEND_VAL                                                 '%3E'
         27        DO_ICALL                                         $4      
         28        SEND_VAR                                                 $4
         29        DO_ICALL                                                 
   11    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.87 ms | 1395 KiB | 17 Q