3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 48; //print the last n digits from mysterycode aka greyCode for($k=pow(2,$n)-$n;$k<pow(2,$n);$k++){ //echo tobin($mC[$k], $n)."\r\n<br>"; echo tobin(floatval(binaryToGray($k)),$n)."\r\n"; } function binaryToGray($num) { return $num ^ ($num >> 1); } function tobin($nr,$n){ $cnt = $n;//pow(2,$n); $converted_nr = base_convert($nr,10,2); if (strlen($converted_nr)<$cnt){ return leadZero($converted_nr,$cnt-strlen($converted_nr)-1); }else{ return $converted_nr; } } function leadZero($a,$nrZeros){ return str_pad($a, $nrZeros, "0", STR_PAD_LEFT); }

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.0070.01518.56
8.3.50.0190.00018.17
8.3.40.0120.00318.73
8.3.30.0130.00318.69
8.3.20.0040.00421.53
8.3.10.0090.00020.56
8.3.00.0070.00023.61
8.2.180.0030.01218.41
8.2.170.0070.01122.96
8.2.160.0040.01120.34
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00320.53
8.2.120.0040.00426.35
8.2.110.0070.00321.02
8.2.100.0110.00017.84
8.2.90.0050.00319.11
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0030.00617.80
8.2.50.0040.00418.99
8.2.40.0040.00420.42
8.2.30.0050.00520.32
8.2.20.0000.00717.98
8.2.10.0040.00418.14
8.2.00.0040.00418.22
8.1.280.0180.00325.92
8.1.270.0040.00420.63
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0070.00319.21
8.1.230.0090.00319.17
8.1.220.0000.00917.78
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00617.22
8.1.180.0060.00318.10
8.1.170.0030.00518.64
8.1.160.0000.00718.83
8.1.150.0000.00920.40
8.1.140.0030.00519.60
8.1.130.0000.00820.84
8.1.120.0040.00417.41
8.1.110.0040.00417.43
8.1.100.0080.00017.43
8.1.90.0030.00717.45
8.1.80.0040.00417.48
8.1.70.0030.00317.50
8.1.60.0020.00517.59
8.1.50.0040.00417.42
8.1.40.0040.00417.47
8.1.30.0000.00917.68
8.1.20.0030.00717.68
8.1.10.0000.00817.56
8.1.00.0080.00017.47
8.0.300.0000.00818.77
8.0.290.0070.00016.75
8.0.280.0030.00318.43
8.0.270.0040.00417.36
8.0.260.0000.00817.33
8.0.250.0040.00417.00
8.0.240.0030.00617.05
8.0.230.0080.00017.08
8.0.220.0040.00416.94
8.0.210.0030.00316.86
8.0.200.0070.00017.04
8.0.190.0040.00416.91
8.0.180.0040.00417.02
8.0.170.0030.00516.91
8.0.160.0000.00717.05
8.0.150.0000.00716.92
8.0.140.0000.00716.82
8.0.130.0030.00313.40
8.0.120.0000.00816.88
8.0.110.0050.00216.85
8.0.100.0000.00816.76
8.0.90.0000.00717.04
8.0.80.0150.00617.03
8.0.70.0040.00416.95
8.0.60.0000.00716.79
8.0.50.0040.00416.87
8.0.30.0120.00816.99
8.0.20.0100.01317.40
8.0.10.0070.00017.09
8.0.00.0130.00916.88
7.4.330.0030.00315.55
7.4.320.0000.00616.46
7.4.300.0030.00316.53
7.4.290.0000.00816.51
7.4.280.0000.00816.65
7.4.270.0030.00316.54
7.4.260.0050.00416.50
7.4.250.0070.00016.47
7.4.240.0030.00316.39
7.4.230.0070.00016.62
7.4.220.0120.01016.50
7.4.210.0130.00316.69
7.4.200.0000.00816.65
7.4.160.0120.00516.47
7.4.150.0090.00917.40
7.4.140.0190.00517.86
7.4.130.0100.01116.65
7.4.120.0160.00516.67
7.4.110.0080.00816.53
7.4.100.0080.01116.55
7.4.90.0070.01116.51
7.4.80.0110.00719.39
7.4.70.0030.01716.53
7.4.60.0130.00316.57
7.4.50.0030.01216.60
7.4.40.0100.00616.57
7.4.30.0110.00616.38
7.4.00.0070.01114.87
7.3.330.0030.00313.16
7.3.320.0030.00313.43
7.3.310.0000.00716.27
7.3.300.0030.00316.39
7.3.290.0000.00716.24
7.3.280.0100.00916.37
7.3.270.0070.01717.40
7.3.260.0090.01116.35
7.3.250.0050.01216.46
7.3.240.0070.01116.51
7.3.230.0070.01116.51
7.3.210.0120.00916.60
7.3.200.0040.01316.60
7.3.190.0080.00816.59
7.3.180.0090.00916.52
7.3.170.0060.01016.30
7.3.160.0080.00816.57
7.3.10.0070.01316.09
7.3.00.0110.00816.60
7.2.330.0140.00616.61
7.2.320.0190.00616.79
7.2.310.0070.01116.42
7.2.300.0060.01716.79
7.2.290.0160.00016.74
7.2.130.0100.00716.38
7.2.120.0070.00716.76
7.2.110.0110.00616.43
7.2.100.0130.00716.57
7.2.90.0120.00816.84
7.2.80.0130.01317.13
7.2.70.0230.01016.77
7.2.60.0240.00816.84
7.2.50.0240.01116.79
7.2.40.0220.00516.73
7.2.30.0220.00916.99
7.2.20.0220.01016.98
7.2.10.0140.01417.05
7.2.00.0110.00917.96
7.1.250.0060.00915.43
7.1.240.0070.01015.54
7.1.230.0160.00415.58
7.1.220.0060.00615.57
7.1.210.0110.00715.42
7.1.200.0110.00715.69
7.1.190.0260.00415.58
7.1.180.0180.01115.79
7.1.170.0150.01215.87
7.1.160.0210.01115.68
7.1.150.0130.01315.82
7.1.140.0220.00515.89
7.1.130.0190.01015.86
7.1.120.0220.00915.68
7.1.110.0180.01215.95
7.1.100.0120.00916.88
7.1.90.0130.01315.70
7.1.80.0190.01315.91
7.1.70.0130.00616.56
7.1.60.0100.00816.64
7.1.50.0090.01616.38
7.1.40.0120.00516.12
7.1.30.0170.00816.11
7.1.20.0120.00516.30
7.1.10.0080.01116.12
7.1.00.0050.00616.23
7.0.330.0170.00314.93
7.0.320.0040.01115.09
7.0.310.0150.00415.08
7.0.300.0140.00015.37
7.0.290.0090.00915.46
7.0.280.0060.01315.14
7.0.270.0080.01215.40
7.0.260.0170.00715.46
7.0.250.0150.00715.35
7.0.240.0070.01015.35
7.0.230.0170.00015.34
7.0.220.0100.00915.45
7.0.210.0110.00715.34
7.0.200.0070.00515.85
7.0.190.0110.00516.17
7.0.180.0070.00715.90
7.0.170.0060.00715.95
7.0.160.0100.00715.86
7.0.150.0050.00815.89
7.0.140.0040.00915.91
7.0.130.0060.00915.87
7.0.120.0090.00316.01
7.0.110.0070.00515.86
7.0.100.0070.00615.83
7.0.90.0030.00815.83
7.0.80.0040.00515.99
7.0.70.0060.00715.76
7.0.60.0060.01215.98
7.0.50.0070.00715.86
7.0.40.0080.00414.96
7.0.30.0070.00214.94
7.0.20.0050.00714.96
7.0.10.0050.00815.00
7.0.00.0030.00814.93
5.6.380.0080.00814.14

preferences:
58.05 ms | 400 KiB | 5 Q