3v4l.org

run code in 300+ PHP versions simultaneously
<?php $checksum = crc32("The quick brown fox jumped over the lazy dog."); $outstring = ''; $l = strlen($data); for ($i = 0; $i < $l; $i += 8) { $chunk = substr($data, $i, 8); $outlen = ceil((strlen($chunk) * 8)/6); //8bit/char in, 6bits/char out, round up $x = bin2hex($chunk); //gmp won't convert from binary, so go via hex $w = gmp_strval(gmp_init(ltrim($x, '0'), 16), 62); //gmp doesn't like leading 0s $pad = str_pad($w, $outlen, '0', STR_PAD_LEFT); $outstring .= $pad; } echo $outstring; printf("%u\n", $checksum);

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.0130.00616.62
8.3.60.0140.00718.56
8.3.50.0110.00616.34
8.3.40.0110.00418.92
8.3.30.0070.01118.71
8.3.20.0050.00218.98
8.3.10.0050.00321.85
8.3.00.0000.00819.48
8.2.180.0180.00416.63
8.2.170.0090.00622.96
8.2.160.0090.00920.53
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00422.08
8.2.120.0070.00026.35
8.2.110.0030.00720.52
8.2.100.0060.00617.86
8.2.90.0030.00519.27
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0030.00617.93
8.2.50.0040.00418.10
8.2.40.0030.00622.18
8.2.30.0000.00820.97
8.2.20.0040.00418.05
8.2.10.0000.00718.18
8.2.00.0030.00518.02
8.1.280.0090.00625.92
8.1.270.0040.00422.20
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0050.00523.91
8.1.230.0040.00720.88
8.1.220.0060.00317.74
8.1.210.0030.00618.77
8.1.200.0060.00317.10
8.1.190.0030.00517.23
8.1.180.0070.00018.10
8.1.170.0070.00018.45
8.1.160.0000.00818.95
8.1.150.0000.00820.48
8.1.140.0070.00319.46
8.1.130.0030.00518.88
8.1.120.0070.00017.40
8.1.110.0000.00817.42
8.1.100.0040.00417.27
8.1.90.0040.00417.46
8.1.80.0080.00017.39
8.1.70.0040.00417.46
8.1.60.0060.00317.41
8.1.50.0070.00017.35
8.1.40.0030.00517.50
8.1.30.0030.00617.58
8.1.20.0040.00417.61
8.1.10.0000.00917.47
8.1.00.0000.00817.44
8.0.300.0040.00418.77
8.0.290.0050.00316.88
8.0.280.0030.00318.41
8.0.270.0030.00317.26
8.0.260.0040.00416.88
8.0.250.0000.00717.03
8.0.240.0040.00417.01
8.0.230.0000.00616.98
8.0.220.0000.00816.91
8.0.210.0000.00716.87
8.0.200.0040.00416.98
8.0.190.0000.00916.98
8.0.180.0080.00016.91
8.0.170.0030.00416.84
8.0.160.0030.00716.83
8.0.150.0040.00416.89
8.0.140.0070.00016.89
8.0.130.0030.00313.35
8.0.120.0050.00316.76
8.0.110.0020.00516.91
8.0.100.0040.00416.86
8.0.90.0000.00816.84
8.0.80.0140.00016.91
8.0.70.0050.00316.88
8.0.60.0030.00616.95
8.0.50.0000.00816.71
8.0.30.0100.00716.93
8.0.20.0170.01117.40
8.0.10.0070.00016.86
8.0.00.0110.01716.74
7.4.330.0000.00515.55
7.4.320.0040.00416.54
7.4.300.0030.00316.48
7.4.290.0040.00416.44
7.4.280.0030.00616.37
7.4.270.0000.00716.43
7.4.260.0000.00513.15
7.4.250.0030.00316.39
7.4.240.0000.00716.40
7.4.230.0000.00716.54
7.4.220.0140.01116.56
7.4.210.0000.01416.62
7.4.200.0060.00316.48
7.4.160.0110.00616.44
7.4.150.0040.01517.40
7.4.140.0120.00717.86
7.4.130.0150.00616.49
7.4.120.0090.01016.55
7.4.110.0070.01016.43
7.4.100.0120.00416.37
7.4.90.0090.00816.36
7.4.80.0070.01119.39
7.4.70.0050.01616.42
7.4.60.0030.01316.47
7.4.50.0060.00916.37
7.4.40.0080.00916.40
7.4.30.0100.00716.51
7.4.00.0070.00715.17
7.3.330.0000.00613.21
7.3.320.0060.00013.06
7.3.310.0000.00716.29
7.3.300.0060.00316.16
7.3.290.0050.01016.33
7.3.280.0070.01016.32
7.3.270.0130.00317.40
7.3.260.0070.01416.32
7.3.250.0090.01116.32
7.3.240.0080.01116.32
7.3.230.0150.00716.29
7.3.210.0130.00916.25
7.3.200.0130.00316.58
7.3.190.0100.00516.54
7.3.180.0060.00916.32
7.3.170.0120.00616.38
7.3.160.0090.00816.43
7.3.120.0000.01414.93
7.3.110.0090.00614.92
7.3.100.0070.01014.84
7.3.90.0060.00614.73
7.3.80.0070.00714.54
7.3.70.0100.00614.71
7.3.60.0070.00714.56
7.3.50.0030.00614.82
7.3.40.0120.00314.85
7.3.30.0000.01214.82
7.3.20.0000.01016.67
7.3.10.0020.01216.71
7.3.00.0050.00816.76
7.2.330.0150.00316.51
7.2.320.0030.01916.38
7.2.310.0040.01416.32
7.2.300.0060.01516.77
7.2.290.0060.01916.47
7.2.240.0080.00415.26
7.2.230.0000.01014.95
7.2.220.0050.00514.75
7.2.210.0070.00714.72
7.2.200.0070.00414.91
7.2.190.0060.00614.94
7.2.180.0090.00614.99
7.2.170.0040.01115.10
7.2.160.0100.00715.00
7.2.150.0070.01116.97
7.2.140.0000.01216.63
7.2.130.0050.00716.86
7.2.120.0060.00616.92
7.2.110.0090.00616.84
7.2.100.0050.00716.87
7.2.90.0040.00916.92
7.2.80.0110.00416.78
7.2.70.0080.01016.57
7.2.60.0070.00716.72
7.2.50.0120.00316.74
7.2.40.0070.00816.82
7.2.30.0090.00317.00
7.2.20.0060.00917.01
7.2.10.0090.00716.87
7.2.00.0080.00617.61
7.1.330.0040.00416.05
7.1.320.0040.01115.71
7.1.310.0070.00315.75
7.1.300.0060.01015.82
7.1.290.0030.01015.80
7.1.280.0150.00015.83
7.1.270.0030.01016.02
7.1.260.0080.00815.85
7.1.250.0030.00815.95
7.1.200.0080.00815.78
7.1.100.0100.00317.95
7.1.70.0700.01015.34
7.1.60.0830.01733.41
7.1.50.0870.02032.87
7.1.40.0930.01332.55
7.1.30.0870.02032.73
7.1.20.1030.01032.88
7.1.10.0900.01314.70
7.1.00.0770.01014.78
7.0.200.0770.00714.96
7.0.190.0600.01315.05
7.0.180.0770.01014.35
7.0.170.0700.01714.42
7.0.160.0730.01314.39
7.0.150.0670.01714.54
7.0.140.0670.01714.51
7.0.130.0770.01014.79
7.0.120.0830.01314.67
7.0.110.0830.00714.52
7.0.100.0730.01314.50
7.0.90.0870.00714.64
7.0.80.0700.01314.61
7.0.70.0770.01314.43
7.0.60.0830.00714.10
7.0.50.0770.01714.60
7.0.40.3070.01314.75
7.0.30.0770.02014.67
7.0.20.0630.02014.62
7.0.10.0870.01014.78
7.0.00.0830.00014.61

preferences:
53.01 ms | 401 KiB | 5 Q