3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vc = version_compare('5.4', PHP_VERSION); if (1 === $vc) { echo 'running 5.3 legacy code'; } else { echo 'running 5.4 code'; var_dump($vc); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QiJE6
function name:  (null)
number of ops:  14
compiled vars:  !0 = $vc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'version_compare'
          1        SEND_VAL                                                 '5.4'
          2        SEND_VAL                                                 '8.0.0'
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    5     5        IS_IDENTICAL                                             !0, 1
          6      > JMPZ                                                     ~3, ->9
    6     7    >   ECHO                                                     'running+5.3+legacy+code'
          8      > JMP                                                      ->13
    8     9    >   ECHO                                                     'running+5.4+code'
         10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
    9    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.75 ms | 1394 KiB | 17 Q