3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generatePassword($username, $password ) { /* 1. RESULT = LOWER_CASE ( username ) + PASSWORD 2. RESULT = LOWER_CASE ( SHA1_HEX(RESULT) ) 3. RESULT = SESSIONID + RESULT 4. RESULT = UPPER_CASE ( SHA1_HEX(RESULT) ) */ $this->_sessionid = 'GEW4JHV7H7JOR5IV868R'; if( $this->_sessionid ) { //1. $result = strtolower( $username ) . $password; //2. $result = strtolower( sha1( $result ) ); //3. $result = $this->_sessionid . $result; //4. $result = strtoupper( sha1( $result ) ); } else { $result = false; } return $result; } print_r(generatePassword('599750531', '4321')); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0090.00616.75
8.3.50.0150.00416.25
8.3.40.0090.00918.92
8.3.30.0110.00418.67
8.3.20.0090.00020.17
8.3.10.0040.00423.57
8.3.00.0080.00022.51
8.2.180.0070.00716.63
8.2.170.0140.00022.96
8.2.160.0110.00422.07
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.13
8.2.110.0070.00320.94
8.2.100.0080.00317.63
8.2.90.0000.00719.17
8.2.80.0080.00017.97
8.2.70.0050.00317.61
8.2.60.0060.00317.77
8.2.50.0030.01018.07
8.2.40.0030.00521.11
8.2.30.0040.00419.83
8.2.20.0030.00517.59
8.2.10.0050.00318.01
8.2.00.0000.00817.86
8.1.280.0140.00725.92
8.1.270.0050.00320.25
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00322.05
8.1.230.0120.00017.79
8.1.220.0040.00817.74
8.1.210.0040.00418.77
8.1.200.0040.00417.22
8.1.190.0000.00817.00
8.1.180.0040.00418.10
8.1.170.0050.00318.54
8.1.160.0030.00521.90
8.1.150.0060.00618.77
8.1.140.0070.00017.20
8.1.130.0040.00417.60
8.1.120.0050.00217.35
8.1.110.0000.00717.25
8.1.100.0080.00017.36
8.1.90.0050.00217.32
8.1.80.0080.00317.23
8.1.70.0000.00817.37
8.1.60.0040.00417.58
8.1.50.0060.00317.52
8.1.40.0040.00417.47
8.1.30.0030.00617.56
8.1.20.0000.00717.62
8.1.10.0040.00417.42
8.1.00.0000.00817.48
8.0.300.0040.00418.77
8.0.290.0050.00216.75
8.0.280.0070.00018.46
8.0.270.0030.00517.21
8.0.260.0000.00817.08
8.0.250.0040.00417.00
8.0.240.0000.00817.04
8.0.230.0050.00516.82
8.0.220.0030.00316.75
8.0.210.0000.00716.90
8.0.200.0030.00317.04
8.0.190.0090.00316.92
8.0.180.0040.00417.01
8.0.170.0030.00616.86
8.0.160.0040.00416.85
8.0.150.0040.00416.89
8.0.140.0000.00716.82
8.0.130.0000.00613.41
8.0.120.0080.00016.81
8.0.110.0000.00716.91
8.0.100.0070.00017.00
8.0.90.0040.00416.93
8.0.80.0070.00716.97
8.0.70.0040.00416.96
8.0.60.0040.00416.80
8.0.50.0040.00416.78
8.0.30.0090.00916.88
8.0.20.0100.00917.40
8.0.10.0030.00417.02
8.0.00.0110.00816.66
7.4.330.0050.00015.08
7.4.320.0030.00316.52
7.4.300.0030.00316.45
7.4.290.0000.00816.46
7.4.280.0080.00016.58
7.4.270.0000.00616.46
7.4.260.0000.00716.33
7.4.250.0000.00716.41
7.4.240.0000.00716.46
7.4.230.0000.00716.63
7.4.220.0100.01616.50
7.4.210.0030.01216.48
7.4.200.0030.00316.35
7.4.160.0060.01316.66
7.4.150.0170.00017.40
7.4.140.0130.01017.86
7.4.130.0120.00916.40
7.4.120.0090.01016.46
7.4.110.0070.01116.56
7.4.100.0180.00716.62
7.4.90.0140.00416.48
7.4.80.0090.00919.39
7.4.70.0110.01216.44
7.4.60.0080.00816.57
7.4.50.0000.00816.36
7.4.40.0120.00616.64
7.4.30.0110.00716.57
7.4.10.0110.00414.84
7.4.00.0060.00914.97
7.3.330.0050.00313.29
7.3.320.0070.00013.32
7.3.310.0000.00716.32
7.3.300.0050.00216.14
7.3.290.0090.00516.31
7.3.280.0050.01316.31
7.3.270.0110.00717.40
7.3.260.0030.02016.35
7.3.250.0090.01016.35
7.3.240.0100.00716.45
7.3.230.0090.00916.60
7.3.210.0040.01416.59
7.3.200.0170.00619.39
7.3.190.0090.00616.21
7.3.180.0030.01316.25
7.3.170.0130.00916.34
7.3.160.0070.01416.42
7.3.130.0070.01014.94
7.3.120.0040.01414.67
7.3.110.0000.01914.78
7.3.100.0040.01114.66
7.3.90.0140.00314.75
7.3.80.0000.01015.17
7.3.70.0060.00614.86
7.3.60.0000.01614.58
7.3.50.0060.00814.79
7.3.40.0090.00614.76
7.3.30.0030.00614.61
7.3.20.0090.00016.83
7.3.10.0040.01116.63
7.3.00.0090.00316.55
7.2.330.0110.00816.54
7.2.320.0080.01616.61
7.2.310.0070.01116.67
7.2.300.0070.01016.32
7.2.290.0070.01416.54
7.2.260.0130.00614.56
7.2.250.0090.00915.18
7.2.240.0000.01414.97
7.2.230.0070.01015.01
7.2.220.0110.00414.82
7.2.210.0070.00315.01
7.2.200.0030.00914.66
7.2.190.0000.01314.69
7.2.180.0090.00014.86
7.2.170.0080.00614.83
7.2.160.0090.00815.10
7.2.150.0000.01616.71
7.2.140.0080.00816.75
7.2.130.0030.00916.81
7.2.120.0170.00016.58
7.2.110.0040.01116.84
7.2.100.0060.00616.79
7.2.90.0070.01017.02
7.2.80.0070.01016.77
7.2.70.0030.00616.85
7.2.60.0040.01016.61
7.2.50.0040.01116.55
7.2.40.0070.01016.78
7.2.30.0060.01316.80
7.2.20.0080.00816.93
7.2.10.0040.00716.85
7.2.00.0050.00918.05
7.1.330.0040.01115.68
7.1.320.0070.01015.74
7.1.310.0030.01015.70
7.1.300.0070.00415.46
7.1.290.0040.00415.67
7.1.280.0070.00715.69
7.1.270.0150.00015.66
7.1.260.0090.00015.73
7.1.250.0040.01115.75
7.1.240.0110.00315.73
7.1.230.0030.01015.56
7.1.220.0070.00315.71
7.1.210.0030.01015.67
7.1.200.0070.00715.54
7.1.190.0030.01015.75
7.1.180.0120.00315.67
7.1.170.0030.00615.79
7.1.160.0000.01115.69
7.1.150.0030.01315.67
7.1.140.0000.00815.66
7.1.130.0030.00915.67
7.1.120.0110.00715.51
7.1.110.0070.01015.73
7.1.100.0050.00716.89
7.1.90.0000.01415.61
7.1.80.0030.01315.53
7.1.70.0050.00716.20
7.1.60.0080.01017.45
7.1.50.0100.00716.35
7.1.40.0120.00015.54
7.1.30.0060.00915.75
7.1.20.0050.00815.49
7.1.10.0070.00415.68
7.1.00.0050.04219.08
7.0.330.0070.00715.42
7.0.320.0130.00015.35
7.0.310.0080.00015.33
7.0.300.0030.00615.43
7.0.290.0000.01015.27
7.0.280.0150.00315.28
7.0.270.0060.00615.38
7.0.260.0040.01515.30
7.0.250.0040.00415.45
7.0.240.0040.00415.49
7.0.230.0040.00715.32
7.0.220.0110.00415.34
7.0.210.0040.01115.49
7.0.200.0050.00915.93
7.0.190.0060.00315.28
7.0.180.0070.00715.19
7.0.170.0060.00615.48
7.0.160.0070.01015.41
7.0.150.0060.00915.48
7.0.140.0060.00315.36
7.0.130.0100.00315.35
7.0.120.0080.00415.52
7.0.110.0040.01115.43
7.0.100.0030.00915.16
7.0.90.0000.01415.45
7.0.80.0070.00715.31
7.0.70.0080.00015.39
7.0.60.0070.04217.61
7.0.50.0050.02316.67
7.0.40.0060.03016.87
7.0.30.0230.03816.73
7.0.20.0080.03116.69
7.0.10.0080.04516.62
7.0.00.0010.04316.79
5.6.400.0030.01014.24
5.6.390.0000.00913.93
5.6.380.0090.00314.46
5.6.370.0040.01514.23
5.6.360.0030.01314.38
5.6.350.0030.01014.25
5.6.340.0000.01214.18
5.6.330.0060.00614.42
5.6.320.0060.00614.46
5.6.310.0090.00613.84
5.6.300.0030.01014.14
5.6.290.0110.00414.34
5.6.280.0030.04217.51
5.6.270.0030.01014.16
5.6.260.0030.01013.96
5.6.250.0000.01514.56
5.6.240.0110.00314.31
5.6.230.0040.01614.08
5.6.220.0030.01314.18
5.6.210.0070.03817.39
5.6.200.0040.04216.30
5.6.190.0070.04617.38
5.6.180.1900.02817.60
5.6.170.0210.02117.30
5.6.160.0100.03117.38
5.6.150.0090.04216.28
5.6.140.0070.04516.35
5.6.130.0050.02816.19
5.6.120.0070.03317.65
5.6.110.0080.02817.55
5.6.100.0070.04217.58
5.6.90.0080.04617.70
5.6.80.0090.03717.19
5.6.70.2180.02517.28
5.6.60.0070.00714.01
5.6.50.0030.00914.30
5.6.40.0090.00614.20
5.6.30.0080.01114.02
5.6.20.0080.00414.09
5.6.10.0100.00714.21
5.6.00.0140.00014.21
5.5.380.0070.00714.16
5.5.370.0000.00914.31
5.5.360.0060.00614.54
5.5.350.0170.03917.19
5.5.340.0120.04016.04
5.5.330.0130.04817.32
5.5.320.1980.02517.11
5.5.310.0200.02517.27
5.5.300.0140.03716.18
5.5.290.0050.02616.06
5.5.280.0080.02017.21
5.5.270.0080.04317.46
5.5.260.0080.03017.50
5.5.250.0130.03217.44
5.5.240.0170.03217.19
5.5.230.0110.00414.16
5.5.220.0060.01013.91
5.5.210.0060.00613.88
5.5.200.0060.01013.89
5.5.190.0090.00913.90
5.5.180.0070.00713.68
5.5.170.0040.00413.76
5.5.160.0030.01014.02
5.5.150.0070.00413.68
5.5.140.0060.00914.04
5.5.130.0100.00014.01
5.5.120.0040.01113.92
5.5.110.0100.00313.94
5.5.100.0040.00414.25
5.5.90.0040.00414.14
5.5.80.0040.00414.02
5.5.70.0100.00313.87
5.5.60.0080.00413.88
5.5.50.0060.00614.02
5.5.40.0060.00613.88
5.5.30.0030.00714.03
5.5.20.0040.01114.17
5.5.10.0040.01113.86
5.5.00.0060.00313.86
5.4.450.0500.02815.29
5.4.440.0380.03315.19
5.4.430.0450.03315.05
5.4.420.0320.03115.28
5.4.410.0230.03014.99
5.4.400.0080.02714.91
5.4.390.0070.03214.94
5.4.380.0420.02914.89
5.4.370.0350.03215.03
5.4.360.0480.02814.94
5.4.350.0370.03215.05
5.4.340.0480.03814.95
5.4.330.0030.00710.93
5.4.320.0500.03714.85
5.4.310.0450.03314.97
5.4.300.0460.03414.87
5.4.290.0470.03214.94
5.4.280.0420.03214.96
5.4.270.0400.03414.98
5.4.260.0530.02515.03
5.4.250.0380.03114.87
5.4.240.0380.03014.89
5.4.230.0380.03314.89
5.4.220.0070.04214.94
5.4.210.0070.03215.07
5.4.200.0180.02913.72
5.4.190.0320.03214.91
5.4.180.0420.03114.93
5.4.170.0450.02514.94
5.4.160.0100.03314.95
5.4.150.0080.03315.07
5.4.140.0280.03313.74
5.4.130.0400.02713.68
5.4.120.0550.03513.64
5.4.110.0520.03613.62
5.4.100.0370.03513.63
5.4.90.0370.03013.70
5.4.80.0430.03013.66
5.4.70.0370.02713.66
5.4.60.0170.03813.83
5.4.50.0050.01713.76
5.4.40.0140.02513.66
5.4.30.0170.03713.61
5.4.20.0200.01713.54
5.4.10.0040.00710.79
5.4.00.0090.00310.74

preferences:
64.66 ms | 400 KiB | 5 Q