3v4l.org

run code in 300+ PHP versions simultaneously
<?php // The normal way echo sha1('1981'); echo PHP_EOL; // Your way $str = mb_convert_encoding('1981', 'UTF-16LE'); echo $result = strtoupper(sha1($str));

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.0120.00318.18
8.3.50.0070.01019.76
8.3.40.0120.00318.60
8.3.30.0150.00018.85
8.3.20.0070.00020.63
8.3.10.0080.00021.84
8.3.00.0050.00320.68
8.2.180.0090.00618.16
8.2.170.0120.00318.97
8.2.160.0070.01022.96
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0060.00320.30
8.2.100.0090.00317.91
8.2.90.0080.00017.75
8.2.80.0000.00817.97
8.2.70.0080.00018.05
8.2.60.0030.00618.22
8.2.50.0070.00318.10
8.2.40.0000.00821.04
8.2.30.0000.00719.18
8.2.20.0040.00418.02
8.2.10.0040.00419.19
8.2.00.0070.00019.16
8.1.280.0040.01125.92
8.1.270.0030.00622.24
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00423.79
8.1.230.0040.00819.08
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0050.00317.22
8.1.180.0030.00518.10
8.1.170.0000.00918.50
8.1.160.0030.00318.87
8.1.150.0040.00418.79
8.1.140.0030.00320.22
8.1.130.0030.00320.10
8.1.120.0000.00717.43
8.1.110.0000.00817.49
8.1.100.0000.00817.34
8.1.90.0040.00417.39
8.1.80.0000.00717.42
8.1.70.0000.00717.41
8.1.60.0030.00617.57
8.1.50.0050.00517.50
8.1.40.0080.00017.38
8.1.30.0040.00417.56
8.1.20.0040.00417.53
8.1.10.0030.00517.58
8.1.00.0030.00617.47
8.0.300.0000.00819.71
8.0.290.0050.00316.75
8.0.280.0030.00318.50
8.0.270.0000.00717.31
8.0.260.0030.00320.14
8.0.250.0040.00417.04
8.0.240.0000.00716.99
8.0.230.0050.00316.87
8.0.220.0030.00316.88
8.0.210.0000.00716.85
8.0.200.0040.00416.94
8.0.190.0040.00416.98
8.0.180.0060.00316.97
8.0.170.0030.00616.91
8.0.160.0000.00716.81
8.0.150.0060.00316.91
8.0.140.0070.00016.77
8.0.130.0030.00313.30
8.0.120.0040.00416.81
8.0.110.0000.00716.92
8.0.100.0050.00316.91
8.0.90.0050.00516.83
8.0.80.0130.01016.84
8.0.70.0000.00716.76
8.0.60.0000.00816.91
8.0.50.0030.00516.82
8.0.30.0150.00317.09
8.0.20.0070.01117.11
8.0.10.0070.00016.82
8.0.00.0070.01316.93
7.4.330.0000.00415.55
7.4.320.0060.00016.64
7.4.300.0060.00016.60
7.4.290.0040.00416.49
7.4.280.0000.00816.41
7.4.270.0060.00016.61
7.4.260.0030.00313.32
7.4.250.0000.00816.55
7.4.240.0000.00716.58
7.4.230.0040.00416.42
7.4.220.0040.00316.56
7.4.210.0050.01216.60
7.4.200.0070.00016.48
7.4.130.0130.00316.40
7.4.120.0070.01016.34
7.4.110.0090.00916.47
7.4.100.0130.01216.57
7.4.90.0090.01216.51
7.4.80.0090.01119.39
7.4.70.0110.00716.52
7.4.60.0080.00816.39
7.4.50.0030.01316.55
7.4.40.0060.00916.32
7.4.00.0060.00314.75
7.3.330.0040.00416.02
7.3.320.0000.00613.04
7.3.310.0070.00016.27
7.3.300.0000.00716.22
7.3.290.0040.00416.12
7.3.280.0130.00316.21
7.3.260.0120.00816.39
7.3.240.0060.01216.26
7.3.230.0090.01316.49
7.3.210.0130.00316.30
7.3.200.0190.00316.25
7.3.190.0090.01216.36
7.3.180.0180.00616.52
7.3.170.0070.01016.24
7.3.160.0130.00716.52
7.3.100.0100.01014.65
7.3.90.0070.00714.66
7.3.80.0070.01314.69
7.3.70.0000.01414.82
7.3.60.0090.00914.63
7.3.50.0000.01414.59
7.3.40.0070.01114.58
7.3.30.0040.01114.77
7.3.20.0110.00414.66
7.3.10.0060.01214.24
7.3.00.0090.00614.77
7.2.330.0070.01016.44
7.2.320.0100.00716.68
7.2.310.0090.01216.64
7.2.300.0070.01016.58
7.2.290.0100.00616.67
7.2.230.0040.01114.70
7.2.220.0070.01015.18
7.2.210.0070.01314.98
7.2.200.0090.00614.86
7.2.190.0180.00314.95
7.2.180.0070.00714.79
7.2.170.0040.01214.72
7.2.160.0060.01614.80
7.2.150.0100.01214.49
7.2.140.0110.01114.91
7.2.130.0140.00615.03
7.2.120.0160.00614.66
7.2.110.0160.00714.73
7.2.100.0120.00314.91
7.2.90.0100.00715.21
7.2.80.0110.00415.28
7.2.70.0100.00714.67
7.2.60.0130.00315.00
7.2.50.0060.00914.93
7.2.40.0170.00414.91
7.2.30.0060.01015.12
7.2.20.0030.01514.88
7.2.10.0080.01215.13
7.2.00.0100.01014.96
7.1.320.0120.00914.01
7.1.310.0150.00613.87
7.1.300.0120.00613.66
7.1.290.0090.00913.60
7.1.280.0070.00713.82
7.1.270.0170.00313.62
7.1.260.0120.00413.60
7.1.250.0150.00613.84

preferences:
52.3 ms | 400 KiB | 5 Q