3v4l.org

run code in 300+ PHP versions simultaneously
<?php $needsVersion = '5.2'; $versions = ['5', '5.x', '5.1', '5.2', '5.2-dev', '5.2.0', '5.2.1', '5.3']; foreach ($versions as $version) { if (version_compare($version, $needsVersion, '>=')) { echo "{$version} >= $needsVersion\n"; } else { echo "{$version} < $needsVersion\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 22
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 22
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/a0jb5
function name:  (null)
number of ops:  24
compiled vars:  !0 = $needsVersion, !1 = $versions, !2 = $version
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '5.2'
    4     1        ASSIGN                                                   !1, <array>
    6     2      > FE_RESET_R                                       $5      !1, ->22
          3    > > FE_FETCH_R                                               $5, !2, ->22
    8     4    >   INIT_FCALL                                               'version_compare'
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '%3E%3D'
          8        DO_ICALL                                         $6      
          9      > JMPZ                                                     $6, ->16
    9    10    >   ROPE_INIT                                     4  ~8      !2
         11        ROPE_ADD                                      1  ~8      ~8, '+%3E%3D+'
         12        ROPE_ADD                                      2  ~8      ~8, !0
         13        ROPE_END                                      3  ~7      ~8, '%0A'
         14        ECHO                                                     ~7
    8    15      > JMP                                                      ->21
   11    16    >   ROPE_INIT                                     4  ~11     !2
         17        ROPE_ADD                                      1  ~11     ~11, '+%3C+'
         18        ROPE_ADD                                      2  ~11     ~11, !0
         19        ROPE_END                                      3  ~10     ~11, '%0A'
         20        ECHO                                                     ~10
    6    21    > > JMP                                                      ->3
         22    >   FE_FREE                                                  $5
   13    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.84 ms | 1451 KiB | 14 Q