3v4l.org

run code in 300+ PHP versions simultaneously
<?php function testCrypt() { // Create a random salt $salt = 'abcdefghij1234567890ab'; //this could be moved to index.php pr something like that. if (version_compare(PHP_VERSION, '5.3.0') < 0) die('Minimum reqirements for this application are PHP >= 5.3.0 and your version is: ' . phpversion()); //fix issue #22 if (version_compare(PHP_VERSION, '5.3.7') >= 0) $salt = "$2x$10$" . $salt; if (version_compare(PHP_VERSION, '5.3.7') < 0) $salt = "$2a$10$" . $salt; // Hash the password with the salt $hash = crypt('ksjdfhs346fsad$%%Aâklsdj9842*&', $salt); echo $hash; } testCrypt();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4eGgo
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   INIT_FCALL                                               'testcrypt'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function testcrypt:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 19
filename:       /in/4eGgo
function name:  testCrypt
number of ops:  34
compiled vars:  !0 = $salt, !1 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 'abcdefghij1234567890ab'
   10     1        INIT_FCALL                                               'version_compare'
          2        SEND_VAL                                                 '8.0.0'
          3        SEND_VAL                                                 '5.3.0'
          4        DO_ICALL                                         $3      
          5        IS_SMALLER                                               $3, 0
          6      > JMPZ                                                     ~4, ->11
   11     7    >   INIT_FCALL                                               'phpversion'
          8        DO_ICALL                                         $5      
          9        CONCAT                                           ~6      'Minimum+reqirements+for+this+application+are+PHP+%3E%3D+5.3.0+and+your+version+is%3A+', $5
         10      > EXIT                                                     ~6
   16    11    >   INIT_FCALL                                               'version_compare'
         12        SEND_VAL                                                 '8.0.0'
         13        SEND_VAL                                                 '5.3.7'
         14        DO_ICALL                                         $7      
         15        IS_SMALLER_OR_EQUAL                                      0, $7
         16      > JMPZ                                                     ~8, ->19
   17    17    >   CONCAT                                           ~9      '%242x%2410%24', !0
         18        ASSIGN                                                   !0, ~9
   19    19    >   INIT_FCALL                                               'version_compare'
         20        SEND_VAL                                                 '8.0.0'
         21        SEND_VAL                                                 '5.3.7'
         22        DO_ICALL                                         $11     
         23        IS_SMALLER                                               $11, 0
         24      > JMPZ                                                     ~12, ->27
   20    25    >   CONCAT                                           ~13     '%242a%2410%24', !0
         26        ASSIGN                                                   !0, ~13
   23    27    >   INIT_FCALL                                               'crypt'
         28        SEND_VAL                                                 'ksjdfhs346fsad%24%25%25A%C3%A2klsdj9842%2A%26'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $15     
         31        ASSIGN                                                   !1, $15
   25    32        ECHO                                                     !1
   26    33      > RETURN                                                   null

End of function testcrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.92 ms | 1403 KiB | 20 Q