3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Signature { private $salt = '00f40f6dd20548c514e62b666ebb9e98'; public function setSalt($salt) { $this->salt = $salt; } public function generate($orderNumber, $orderAmount) { if( !empty($orderNumber) && !empty($orderAmount) && isset($this->salt) ) { $orderId = htmlentities($orderNumber); $orderAmount = htmlentities($orderAmount); $amountSum = floatval(str_replace(array(',', ' ', "'", '`'), array('.', '', '', ''), $orderAmount)) * 100; $salt = $this->salt; $signature = md5($orderId.'&'.$orderAmount.'&'.$salt); return $signature; } else { throw new Exception("Ошибка: Не верно переданны параметры для генерации сигнатуры", 1); return 0; } } } $signature = new Signature; $orderNumber = 1; $orderAmount = 200; echo $signature->generate($orderNumber, $orderAmount);

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.40.0060.01518.71
8.3.30.0050.00820.21
8.3.20.0040.00420.38
8.3.10.0040.00421.92
8.3.00.0070.00022.43
8.2.170.0160.00622.96
8.2.160.0100.00322.16
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.79
8.2.110.0060.00322.08
8.2.100.0070.00317.72
8.2.90.0060.00318.89
8.2.80.0070.00019.26
8.2.70.0050.00317.38
8.2.60.0080.00017.80
8.2.50.0030.00618.07
8.2.40.0000.00819.95
8.2.30.0040.00419.45
8.2.20.0040.00417.67
8.2.10.0020.00517.68
8.2.00.0080.00017.67
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0000.00923.84
8.1.230.0040.00719.16
8.1.220.0090.00017.79
8.1.210.0000.00818.77
8.1.200.0040.00717.23
8.1.190.0030.00617.40
8.1.180.0000.00819.01
8.1.170.0040.00418.64
8.1.160.0070.00318.79
8.1.150.0000.00718.68
8.1.140.0050.00217.50
8.1.130.0070.00017.73
8.1.120.0060.00317.42
8.1.110.0000.00717.38
8.1.100.0040.00417.39
8.1.90.0040.00417.48
8.1.80.0000.00717.44
8.1.70.0000.00717.45
8.1.60.0030.00517.55
8.1.50.0050.00317.56
8.1.40.0050.00317.56
8.1.30.0000.00717.67
8.1.20.0030.00617.70
8.1.10.0050.00317.64
8.1.00.0040.00417.55
8.0.300.0070.00018.77
8.0.290.0040.00417.05
8.0.280.0070.00018.49
8.0.270.0030.00317.25
8.0.260.0030.00316.75
8.0.250.0070.00017.03
8.0.240.0000.00816.99
8.0.230.0030.00316.96
8.0.220.0070.00016.85
8.0.210.0000.00716.81
8.0.200.0000.00817.02
8.0.190.0000.00716.93
8.0.180.0070.00016.97
8.0.170.0050.00316.78
8.0.160.0050.00316.80
8.0.150.0000.00716.78
8.0.140.0040.00416.85
8.0.130.0030.00313.34
8.0.120.0000.00816.77
8.0.110.0040.00416.88
8.0.100.0050.00216.91
8.0.90.0030.00516.89
8.0.80.0090.00616.91
8.0.70.0080.00016.83
8.0.60.0030.00517.00
8.0.50.0030.00616.86
8.0.30.0080.01117.10
8.0.20.0100.01217.40
8.0.10.0000.00716.86
8.0.00.0110.00916.89
7.4.330.0060.00015.00
7.4.320.0000.00616.66
7.4.300.0000.00616.54
7.4.290.0030.00316.54
7.4.280.0000.00716.52
7.4.270.0040.00416.61
7.4.260.0070.00013.20
7.4.250.0000.00716.54
7.4.240.0030.00416.50
7.4.230.0070.00016.46
7.4.220.0030.01516.68
7.4.210.0030.01116.56
7.4.200.0030.00316.52
7.4.190.0000.00716.43
7.4.160.0030.01316.32
7.4.150.0110.00717.40
7.4.140.0130.00517.86
7.4.130.0090.00816.58
7.4.120.0080.00916.49
7.4.110.0120.00616.57
7.4.100.0100.00616.47
7.4.90.0040.01316.45
7.4.80.0070.01319.39
7.4.70.0080.00816.41
7.4.60.0000.02116.45
7.4.50.0000.00416.59
7.4.40.0030.01322.77
7.4.30.0050.01116.58
7.4.10.0040.01414.80
7.4.00.0100.00715.06
7.3.330.0000.00613.28
7.3.320.0030.00313.38
7.3.310.0070.00016.38
7.3.300.0030.00316.32
7.3.290.0070.01116.40
7.3.280.0070.01116.33
7.3.270.0050.01317.40
7.3.260.0140.01016.28
7.3.250.0060.01216.42
7.3.240.0140.00416.45
7.3.230.0150.00316.39
7.3.210.0070.01016.41
7.3.200.0140.01719.39
7.3.190.0040.01316.27
7.3.180.0090.00616.50
7.3.170.0110.00516.29
7.3.160.0070.01016.34
7.3.130.0100.00714.83
7.3.120.0050.00814.84
7.3.110.0070.01014.91
7.3.100.0110.00314.82
7.3.90.0070.00714.64
7.3.80.0060.00614.72
7.3.70.0040.00714.87
7.3.60.0110.00414.53
7.3.50.0060.00914.71
7.3.40.0030.01014.75
7.3.30.0190.00314.66
7.3.20.0160.01216.41
7.3.10.0130.01016.62
7.3.00.0190.00516.43
7.2.330.0140.00916.48
7.2.320.0130.00316.65
7.2.310.0110.00616.57
7.2.300.0090.01416.45
7.2.290.0070.01016.54
7.2.260.0090.00915.22
7.2.250.0070.01015.06
7.2.240.0070.00715.23
7.2.230.0060.00615.28
7.2.220.0030.01014.91
7.2.210.0100.00315.14
7.2.200.0050.00515.04
7.2.190.0070.00715.01
7.2.180.0080.00315.16
7.2.170.0090.00614.87
7.2.160.0160.01114.93
7.2.150.0170.01117.11
7.2.140.0150.01316.90
7.2.130.0200.00716.90
7.2.120.0150.01516.61
7.2.110.0170.01417.08
7.2.100.0140.00917.13
7.2.90.0030.00716.92
7.2.80.0080.00817.13
7.2.70.0150.01217.16
7.2.60.0160.01316.87
7.2.50.0190.00917.00
7.2.40.0210.00916.79
7.2.30.0180.01116.97
7.2.20.0120.01816.82
7.2.10.0130.01616.87
7.2.00.0140.00518.20
7.1.330.0090.00615.60
7.1.320.0060.00615.66
7.1.310.0030.00615.50
7.1.300.0060.00915.47
7.1.290.0030.00715.68
7.1.280.0070.00715.87
7.1.270.0160.00815.63
7.1.260.0140.01015.76
7.1.250.0100.01315.85
7.1.240.0150.00815.89
7.1.230.0140.01015.69
7.1.220.0120.00915.83
7.1.210.0030.01015.76
7.1.200.0060.01015.74
7.1.190.0160.01015.86
7.1.180.0140.00915.67
7.1.170.0150.00615.71
7.1.160.0080.01615.71
7.1.150.0150.00315.79
7.1.140.0160.00815.62
7.1.130.0080.01915.49
7.1.120.0230.00315.75
7.1.110.0170.00315.38
7.1.100.0070.01116.98
7.1.90.0120.01515.64
7.1.80.0110.01215.63
7.1.70.0090.01116.50
7.1.60.0060.01616.43
7.1.50.0160.00916.42
7.1.40.0120.01215.84
7.1.30.0130.01315.75
7.1.20.0160.00615.64
7.1.10.0170.00915.81
7.1.00.0090.01618.97
7.0.330.0160.00815.43
7.0.320.0160.00915.07
7.0.310.0100.00315.22
7.0.300.0090.01415.27
7.0.290.0180.00515.00
7.0.280.0200.00415.45
7.0.270.0060.01815.32
7.0.260.0030.02215.45
7.0.250.0150.00615.56
7.0.240.0120.01215.34
7.0.230.0230.00315.47
7.0.220.0140.00915.12
7.0.210.0110.01414.99
7.0.200.0100.01115.91
7.0.190.0110.01115.18
7.0.180.0180.00515.37
7.0.170.0130.00615.50
7.0.160.0140.00715.11
7.0.150.0080.01615.48
7.0.140.0020.04318.71
7.0.130.0000.01015.59
7.0.120.0040.00815.55
7.0.110.0000.01015.37
7.0.100.0040.01215.29
7.0.90.0030.00815.43
7.0.80.0070.00415.07
7.0.70.1420.02117.71
7.0.60.0110.03717.69
7.0.50.0030.04216.68
7.0.40.0080.04116.76
7.0.30.0080.03016.87
7.0.20.0110.03116.81
7.0.10.0150.03116.69
7.0.00.0050.03016.88
5.6.400.0200.00614.11
5.6.390.0100.01614.29
5.6.380.0030.01014.33
5.6.370.0070.01814.07
5.6.360.0100.01514.59
5.6.350.0080.01414.03
5.6.340.0150.01014.06
5.6.330.0190.00814.45
5.6.320.0140.00914.58
5.6.310.0230.00314.47
5.6.300.0030.01314.49
5.6.290.0000.01314.14
5.6.280.0020.04217.94
5.6.270.0110.00314.25
5.6.260.0080.00414.38
5.6.250.0000.01114.20
5.6.240.0100.00014.44
5.6.230.0060.00614.31
5.6.220.0100.00714.42
5.6.210.0030.02717.34
5.6.200.0080.04116.33
5.6.190.0050.02317.52
5.6.180.0160.04217.39
5.6.170.0140.04617.43
5.6.160.0020.04017.43
5.6.150.0020.02916.19
5.6.140.0080.04016.34
5.6.130.0060.02516.22
5.6.120.0110.04617.55
5.6.110.0170.04417.62
5.6.100.0080.02717.63
5.6.90.0110.04817.54
5.6.80.0090.02717.32
5.6.70.0130.04317.35
5.6.60.0180.00914.44
5.6.50.0210.00614.12
5.6.40.0170.00914.38
5.6.30.0080.00814.48
5.6.20.0000.01614.11
5.6.10.0040.01114.31
5.6.00.0070.00714.21
5.5.380.0180.00714.11
5.5.370.0110.01414.41
5.5.360.0150.00813.91
5.5.350.0070.04717.24
5.5.340.0110.04216.13
5.5.330.0090.05117.38
5.5.320.0120.03717.29
5.5.310.0220.04217.20
5.5.300.0120.04316.00
5.5.290.0080.03116.08
5.5.280.0140.03717.47
5.5.270.0160.04417.52
5.5.260.0150.04517.64
5.5.250.0140.02917.40
5.5.240.0110.02717.15
5.5.230.0140.01114.29
5.5.220.0100.01313.92
5.5.210.0130.01313.98
5.5.200.0170.00814.24
5.5.190.0160.00714.01
5.5.180.0040.01613.99
5.5.170.0060.01614.05
5.5.160.0170.00814.20
5.5.150.0140.01014.18
5.5.140.0000.01914.28
5.5.130.0110.01414.10
5.5.120.0130.01314.33
5.5.110.0140.01114.15
5.5.100.0150.01014.05
5.5.90.0130.01314.43
5.5.80.0160.00514.33
5.5.70.0190.00613.80
5.5.60.0120.01513.98
5.5.50.0140.01114.30
5.5.40.0090.01514.28
5.5.30.0150.00614.02
5.5.20.0140.01014.24
5.5.10.0180.00614.32
5.5.00.0080.01814.32
5.4.450.0210.02415.17
5.4.440.0200.02715.39
5.4.430.0200.03615.31
5.4.420.0150.03515.13
5.4.410.0160.04015.35
5.4.400.0220.04015.19
5.4.390.0130.03715.22
5.4.380.0120.02615.05
5.4.370.0120.03514.91
5.4.360.0140.03015.07
5.4.350.0220.03515.05
5.4.340.0150.03915.06
5.4.330.0110.00610.79
5.4.320.0190.02214.88
5.4.310.0170.04315.22
5.4.300.0200.04115.07
5.4.290.0180.03815.02
5.4.280.0120.02415.07
5.4.270.0190.03615.04
5.4.260.0180.02415.07
5.4.250.0100.04215.10
5.4.240.0110.03814.85
5.4.230.0160.03914.95
5.4.220.0200.03715.07
5.4.210.0140.04315.11
5.4.200.0080.02515.02
5.4.190.0200.02614.97
5.4.180.0170.01815.10
5.4.170.0130.04315.05
5.4.160.0210.03115.06
5.4.150.0110.04314.95
5.4.140.0150.03613.54
5.4.130.0150.02013.82
5.4.120.0100.04413.84
5.4.110.0130.02313.84
5.4.100.0280.02513.64
5.4.90.0150.04413.94
5.4.80.0180.03513.74
5.4.70.0120.02413.57
5.4.60.0150.02213.79
5.4.50.0140.03813.79
5.4.40.0170.02813.75
5.4.30.0130.04213.69
5.4.20.0160.03513.86
5.4.10.0140.02813.60
5.4.00.0080.03313.45
5.3.290.0160.04012.60
5.3.280.0150.02612.62
5.3.270.0150.02512.79
5.3.260.0100.03512.64
5.3.250.0130.03012.64
5.3.240.0060.03212.47
5.3.230.0210.03312.55
5.3.220.0100.02712.56
5.3.210.0150.02312.39
5.3.200.0140.03912.48
5.3.190.0130.02812.61
5.3.180.0190.03612.65
5.3.170.0180.02512.63
5.3.160.0190.02512.73
5.3.150.0230.01812.66
5.3.140.0210.02312.54
5.3.130.0150.02512.57
5.3.120.0160.03912.54
5.3.110.0140.03112.60
5.3.100.0230.01212.33
5.3.90.0110.02512.46
5.3.80.0160.03612.22
5.3.70.0160.03912.19
5.3.60.0170.02412.38
5.3.50.0170.02812.19
5.3.40.0100.03012.33
5.3.30.0200.02112.27
5.3.20.0140.03512.12
5.3.10.0170.02411.97
5.3.00.0130.02312.04
5.2.170.0200.04712.22
5.2.160.0200.04312.22
5.2.150.0100.04712.22
5.2.140.0230.04712.22
5.2.130.0200.04712.22
5.2.120.0200.05312.22
5.2.110.0130.03012.22
5.2.100.0200.05712.22
5.2.90.0200.05712.22
5.2.80.0130.05312.22
5.2.70.0200.06012.22
5.2.60.0200.04012.22
5.2.50.0030.04312.22
5.2.40.0170.06012.22
5.2.30.0130.05312.22
5.2.20.0230.04312.22
5.2.10.0130.04712.22
5.2.00.0130.05712.22
5.1.60.0070.03012.22
5.1.50.0170.03012.22
5.1.40.0100.03012.22
5.1.30.0130.05712.22
5.1.20.0200.04312.22
5.1.10.0170.03712.22
5.1.00.0100.03012.22
5.0.50.0070.05012.22
5.0.40.0170.02012.22
5.0.30.0130.05712.22
5.0.20.0100.04012.22
5.0.10.0100.02712.22
5.0.00.0100.06312.22
4.4.90.0070.02312.22
4.4.80.0070.01312.22
4.4.70.0070.03712.22
4.4.60.0100.02312.22
4.4.50.0070.03712.22
4.4.40.0030.05312.22
4.4.30.0070.02012.22
4.4.20.0070.03712.22
4.4.10.0070.03312.22
4.4.00.0200.02712.22
4.3.110.0130.01712.22
4.3.100.0070.02312.22
4.3.90.0000.02712.22
4.3.80.0100.02712.22
4.3.70.0170.02712.22
4.3.60.0070.03012.22
4.3.50.0100.03312.22
4.3.40.0130.04312.22
4.3.30.0030.02712.22
4.3.20.0030.02712.22
4.3.10.0030.03712.22
4.3.00.0030.03312.22

preferences:
42.53 ms | 400 KiB | 5 Q