3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Secure Unique ID if(PHP_VERSION_ID >= 70000) { $random_code = bin2hex( random_bytes(20) ); } else if(PHP_VERSION_ID <= 50600) { exit(-1); } else{ $random_code = "only php7"; } // Not secure for lov php </3 $nick = "anna"; $random_id = md5( md5($nick) . uniqid() ); print_r( [ $random_code, $random_id ] );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 9
Branch analysis from position: 1
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
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D30gq
function name:  (null)
number of ops:  30
compiled vars:  !0 = $random_code, !1 = $nick, !2 = $random_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > JMPZ                                                     <true>, ->9
    4     1    >   INIT_FCALL                                               'bin2hex'
          2        INIT_FCALL                                               'random_bytes'
          3        SEND_VAL                                                 20
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
          8      > JMP                                                      ->13
    5     9    > > JMPZ                                                     <false>, ->12
    6    10    > > EXIT                                                     -1
         11*       JMP                                                      ->13
    8    12    >   ASSIGN                                                   !0, 'only+php7'
   12    13    >   ASSIGN                                                   !1, 'anna'
   13    14        INIT_FCALL                                               'md5'
         15        INIT_FCALL                                               'md5'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $8      
         18        INIT_FCALL                                               'uniqid'
         19        DO_ICALL                                         $9      
         20        CONCAT                                           ~10     $8, $9
         21        SEND_VAL                                                 ~10
         22        DO_ICALL                                         $11     
         23        ASSIGN                                                   !2, $11
   15    24        INIT_FCALL                                               'print_r'
   17    25        INIT_ARRAY                                       ~13     !0
   18    26        ADD_ARRAY_ELEMENT                                ~13     !2
         27        SEND_VAL                                                 ~13
         28        DO_ICALL                                                 
   20    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.82 ms | 1401 KiB | 23 Q