3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getDigest( $password, $data ) { $firstEncoding = base64_encode(hash('sha512', $data, true)); $withPass = $firstStep . $password; return base64_encode(hash('sha512', $withPass, true)); } $password= 'PASSWORD'; $xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><payment><type>PAY_PAGE_AUTH_CAPTURE_INITIALISATION</type><mer chant><merchantid>10000001</merchantid><accountid>20000001</accountid></merchant>< customer><customerid>1</customerid><email>test@test.com</email><name>Test Client</name><dateofbirth>03042000</dateofbirth><address><addressline1>123 Street</addressline1><addressline2></addressline2><city>Guildford</city><province>Surrey</ province><postcode>GU2 2YG</postcode><country>GBR</country></address><mobilenumber>01234123123</mobilenu mber></customer><transaction><amount>1000</amount><currency>USD</currency><mercha ntref>3DIIWxxbGjhPR7g0OSk8</merchantref></transaction><url><responseurl>https://localho st:8443/response</responseurl></url></payment>'; $first = 'ClKm6nuJYhM29fpYYf1zv2mJ4WdS6DZ6RMwvg8BCiCvLA3Nv1HtKh1YK30F1ljNOVWGEcuc9Mmim2DIVI4s+2w=='; echo $first.PHP_EOL; echo $first.$password.PHP_EOL; $second = base64_encode(hash('sha512', $first, true)); echo $second.PHP_EOL;

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.70.0150.00016.50
8.3.60.0070.00716.63
8.3.50.0080.01021.96
8.3.40.0130.00718.72
8.3.30.0070.00719.09
8.3.20.0070.00020.18
8.3.10.0030.00523.66
8.3.00.0080.00019.38
8.2.180.0060.00918.30
8.2.170.0070.00722.96
8.2.160.0070.01020.32
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0050.00326.16
8.2.120.0000.00722.14
8.2.110.0030.00722.19
8.2.100.0040.00817.59
8.2.90.0040.00419.13
8.2.80.0080.00018.04
8.2.70.0040.00417.36
8.2.60.0040.00417.78
8.2.50.0040.00418.07
8.2.40.0080.00019.95
8.2.30.0080.00018.13
8.2.20.0050.00317.69
8.2.10.0040.00418.13
8.2.00.0000.00817.79
8.1.280.0110.00425.92
8.1.270.0000.00823.99
8.1.260.0040.01526.35
8.1.250.0080.00028.09
8.1.240.0060.00323.88
8.1.230.0000.01219.16
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0000.00817.13
8.1.180.0030.00618.10
8.1.170.0050.00318.63
8.1.160.0070.00022.01
8.1.150.0060.00318.61
8.1.140.0050.00317.37
8.1.130.0070.00017.75
8.1.120.0030.00517.47
8.1.110.0070.00317.54
8.1.100.0040.00417.37
8.1.90.0020.00517.36
8.1.80.0000.00717.45
8.1.70.0040.00417.46
8.1.60.0080.00017.62
8.1.50.0060.00317.41
8.1.40.0020.00517.56
8.1.30.0000.00917.51
8.1.20.0070.00017.67
8.1.10.0040.00417.44
8.1.00.0040.00417.43
8.0.300.0000.00820.71
8.0.290.0000.00816.93
8.0.280.0030.00318.43
8.0.270.0000.00717.26
8.0.260.0030.00317.28
8.0.250.0030.00317.00
8.0.240.0000.00716.86
8.0.230.0030.00516.86
8.0.220.0000.00716.94
8.0.210.0040.00416.77
8.0.200.0060.00016.83
8.0.190.0070.00016.83
8.0.180.0050.00316.96
8.0.170.0080.00016.91
8.0.160.0030.00316.89
8.0.150.0040.00416.84
8.0.140.0000.00816.89
8.0.130.0040.00413.32
8.0.120.0080.00016.85
8.0.110.0030.00516.94
8.0.100.0000.00716.91
8.0.90.0070.00017.01
8.0.80.0030.01316.86
8.0.70.0050.00216.81
8.0.60.0000.00816.86
8.0.50.0040.00416.93
8.0.30.0110.00717.21
8.0.20.0140.00417.40
8.0.10.0050.00316.98
8.0.00.0100.01016.89
7.4.330.0030.00315.00
7.4.320.0050.00216.45
7.4.300.0030.00316.42
7.4.290.0040.00416.44
7.4.280.0040.00716.56
7.4.270.0030.00416.47
7.4.260.0050.00316.39
7.4.250.0000.00816.43
7.4.240.0020.00616.54
7.4.230.0070.00016.40
7.4.220.0100.00716.40
7.4.210.0080.00716.48
7.4.200.0030.00516.65
7.4.190.0000.00716.58
7.4.160.0060.01516.47
7.4.150.0130.00617.40
7.4.140.0090.00917.86
7.4.130.0070.00916.57
7.4.120.0110.00716.45
7.4.110.0120.00616.53
7.4.100.0090.00816.47
7.4.90.0100.00716.61
7.4.80.0000.01819.39
7.4.70.0110.00616.59
7.4.60.0110.01216.46
7.4.50.0050.00316.62
7.4.40.0120.00916.51
7.4.30.0080.00816.45
7.4.00.0070.01014.68
7.3.330.0030.00313.19
7.3.320.0030.00313.30
7.3.310.0070.00016.28
7.3.300.0000.00716.25
7.3.290.0100.00316.25
7.3.280.0060.01016.30
7.3.270.0110.00717.40
7.3.260.0060.01016.54
7.3.250.0100.01016.50
7.3.240.0070.01016.40
7.3.230.0090.00616.47
7.3.210.0130.00316.23
7.3.200.0070.00619.39
7.3.190.0070.01416.63
7.3.180.0070.01016.38
7.3.170.0090.00616.47
7.3.160.0130.00616.34
7.3.120.0030.00815.04
7.2.330.0130.00616.86
7.2.320.0110.00816.88
7.2.310.0130.00316.70
7.2.300.0120.00916.45
7.2.290.0130.00916.75
7.2.00.0070.00419.43
7.1.200.0000.01315.86
7.1.100.0030.01218.14
7.1.70.0000.00717.22
7.1.60.0110.01119.46
7.1.50.0080.00516.94
7.1.00.0030.07722.40
7.0.200.0020.00516.46
7.0.140.0030.07021.95
7.0.110.0170.03720.01
7.0.100.0300.06719.98
7.0.90.0230.07320.07
7.0.80.0200.08019.85
7.0.70.0070.08319.93
7.0.60.0100.07020.04
7.0.50.0030.08019.95
7.0.40.0130.06019.83
7.0.30.0130.07319.72
7.0.20.0100.06319.78
7.0.10.0000.04019.84
7.0.00.0100.07019.73
5.6.280.0130.06320.91
5.6.260.0130.06320.67
5.6.250.0130.07320.75
5.6.240.0100.07020.70
5.6.230.0030.05320.70
5.6.220.0030.07320.68
5.6.210.0130.07320.68
5.6.200.0230.07020.62
5.6.190.0200.06720.47
5.6.180.0030.05320.65
5.6.170.0130.07020.86
5.6.160.0000.04320.70
5.6.150.0100.08320.57
5.6.140.0030.08320.55
5.6.130.0000.06020.59
5.6.120.0070.08720.70
5.6.110.0030.05320.64
5.6.100.0100.07720.44
5.6.90.0030.08320.63
5.6.80.0070.08320.00
5.6.70.0030.05019.94
5.6.60.0100.03720.08
5.6.50.0100.06319.97
5.6.40.0030.04019.88
5.6.30.0070.04720.21
5.6.20.0070.08020.04
5.6.10.0100.04020.00
5.6.00.0100.03719.97
5.5.380.0030.07717.54
5.5.370.0100.07717.54
5.5.360.0030.08017.58
5.5.350.0070.07317.26
5.5.340.0100.04017.93
5.5.330.0070.07717.91
5.5.320.0030.07718.14
5.5.310.0100.08718.13
5.5.300.0070.06017.90
5.5.290.0070.08017.95
5.5.280.0070.07317.93
5.5.270.0100.09018.27
5.5.260.0000.04718.26
5.5.250.0070.08017.64
5.5.240.0100.07717.49
5.5.230.0000.06017.43
5.5.220.0070.08017.21
5.5.210.0070.08017.34
5.5.200.0000.03717.48
5.5.190.0070.05317.58
5.5.180.0100.07717.31
5.5.160.0030.07717.28
5.5.150.0070.07717.57
5.5.140.0100.07717.28
5.5.130.0070.06317.47
5.5.120.0070.06017.26
5.5.110.0030.04717.48
5.5.100.0130.07017.36
5.5.90.0070.08017.48
5.5.80.0100.06317.38
5.5.70.0170.04317.17
5.5.60.0030.07717.16
5.5.50.0030.04017.15
5.5.40.0030.07317.34
5.5.30.0100.07317.33
5.5.20.0100.06317.32
5.5.10.0000.04317.19
5.5.00.0070.04017.49
5.4.450.0100.07719.34
5.4.440.0000.04719.51
5.4.430.0200.07719.55
5.4.420.0070.08019.34
5.4.410.0030.07019.20
5.4.400.0200.06319.19
5.4.390.0030.06019.01
5.4.380.0100.06719.34
5.4.370.0030.07318.96
5.4.360.0170.07019.34
5.4.350.0130.06719.02
5.4.340.0070.04319.04
5.4.320.0030.04018.98
5.4.310.0130.04719.23
5.4.300.0130.06319.16
5.4.290.0100.06019.30
5.4.280.0170.07019.00
5.4.270.0170.06719.01
5.4.260.0170.02719.31
5.4.250.0030.08019.01
5.4.240.0100.07319.18
5.4.230.0100.05319.00
5.4.220.0070.08319.22
5.4.210.0100.05019.23
5.4.200.0100.07019.31
5.4.190.0100.07019.15
5.4.180.0070.07719.01
5.4.170.0070.08019.16
5.4.160.0070.06018.93
5.4.150.0100.04019.04
5.4.140.0000.05316.63
5.4.130.0070.07316.60
5.4.120.0030.04016.33
5.4.110.0030.07716.51
5.4.100.0030.04016.36
5.4.90.0000.04716.38
5.4.80.0100.06316.55
5.4.70.0030.06316.55
5.4.60.0070.07016.48
5.4.50.0130.06716.48
5.4.40.0030.04316.59
5.4.30.0030.07316.62
5.4.20.0100.07016.28
5.4.10.0030.04316.40
5.4.00.0100.07015.95
5.3.290.0030.07714.75
5.3.280.0100.07014.72
5.3.270.0070.07014.60
5.3.260.0030.06714.64
5.3.250.0130.05714.46
5.3.240.0070.07714.69
5.3.230.0100.06314.45
5.3.220.0070.06714.70
5.3.210.0070.04014.58
5.3.200.0030.04014.43
5.3.190.0130.06314.54
5.3.180.0130.04314.65
5.3.170.0070.05314.57
5.3.160.0170.04714.55
5.3.150.0070.07014.70
5.3.140.0070.07714.64
5.3.130.0070.04714.67
5.3.120.0030.06314.67
5.3.110.0100.07014.63
5.3.100.0100.06314.05
5.3.90.0070.06314.03
5.3.80.0000.08014.02
5.3.70.0070.04014.02
5.3.60.0030.04014.01
5.3.50.0000.04013.91
5.3.40.0070.03713.80
5.3.30.0000.03713.94
5.3.20.0100.03013.67
5.3.10.0000.03713.61
5.3.00.0000.03313.77
5.2.170.0030.03012.11
5.2.160.0000.03012.11
5.2.150.0000.03712.11
5.2.140.0000.03012.11
5.2.130.0030.03012.11
5.2.120.0030.03012.11
5.2.110.0000.03012.11
5.2.100.0030.02712.11
5.2.90.0000.03012.11
5.2.80.0030.03012.11
5.2.70.0000.03312.11
5.2.60.0000.03012.11
5.2.50.0000.03012.11
5.2.40.0000.02712.11
5.2.30.0000.03012.11
5.2.20.0030.03312.11
5.2.10.0030.02312.11
5.2.00.0030.02712.11
5.1.60.0030.02312.11
5.1.50.0030.02312.11
5.1.40.0030.02312.11
5.1.30.0000.02712.11
5.1.20.0000.02712.11
5.1.10.0000.02312.11
5.1.00.0000.02312.11
5.0.50.0030.02012.11
5.0.40.0000.02012.11
5.0.30.0000.03012.11
5.0.20.0000.02012.11
5.0.10.0030.01712.11
5.0.00.0000.03012.11
4.4.90.0000.01712.11
4.4.80.0000.01712.11
4.4.70.0000.01712.11
4.4.60.0000.01712.11
4.4.50.0000.01712.11
4.4.40.0030.02312.11
4.4.30.0000.01712.11
4.4.20.0030.01312.11
4.4.10.0030.01312.11
4.4.00.0030.02012.11
4.3.110.0030.01312.11
4.3.100.0000.01712.11
4.3.90.0030.02312.11
4.3.80.0070.01712.11
4.3.70.0030.01012.11
4.3.60.0000.01712.11
4.3.50.0000.01712.11
4.3.40.0030.03012.11
4.3.30.0030.01312.11
4.3.20.0000.01712.11
4.3.10.0000.01712.11
4.3.00.0000.01312.11

preferences:
59.63 ms | 401 KiB | 5 Q