3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 47; //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.0110.01116.75
8.3.50.0140.00417.93
8.3.40.0070.00718.56
8.3.30.0110.00418.70
8.3.20.0060.00319.60
8.3.10.0040.00420.53
8.3.00.0040.00423.66
8.2.180.0100.00618.02
8.2.170.0110.00722.96
8.2.160.0140.00020.38
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00020.56
8.2.120.0040.00426.35
8.2.110.0040.00720.98
8.2.100.0060.00617.83
8.2.90.0040.00419.05
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0030.00617.80
8.2.50.0000.00819.28
8.2.40.0040.00420.55
8.2.30.0080.00320.53
8.2.20.0050.00318.06
8.2.10.0070.00018.15
8.2.00.0050.00218.22
8.1.280.0170.00325.92
8.1.270.0040.00420.73
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00321.25
8.1.230.0070.00417.50
8.1.220.0080.00017.79
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0040.00417.22
8.1.180.0060.00318.10
8.1.170.0040.00718.72
8.1.160.0020.00518.92
8.1.150.0030.00520.24
8.1.140.0000.00719.54
8.1.130.0030.00320.85
8.1.120.0040.00417.54
8.1.110.0070.00017.47
8.1.100.0040.00417.39
8.1.90.0000.00817.52
8.1.80.0040.00417.41
8.1.70.0030.00317.55
8.1.60.0000.00917.46
8.1.50.0000.00817.56
8.1.40.0040.00417.43
8.1.30.0070.00017.70
8.1.20.0030.00617.61
8.1.10.0040.00417.54
8.1.00.0040.00417.51
8.0.300.0040.00418.77
8.0.290.0040.00416.58
8.0.280.0040.00418.52
8.0.270.0000.00717.19
8.0.260.0000.00817.16
8.0.250.0030.00317.00
8.0.240.0000.00816.82
8.0.230.0080.00016.94
8.0.220.0040.00416.82
8.0.210.0030.00316.93
8.0.200.0050.00316.97
8.0.190.0040.00416.96
8.0.180.0040.00416.95
8.0.170.0040.00416.83
8.0.160.0040.00416.81
8.0.150.0040.00416.84
8.0.140.0000.00816.86
8.0.130.0050.00013.28
8.0.120.0060.00316.77
8.0.110.0050.00216.77
8.0.100.0030.00317.03
8.0.90.0040.00416.80
8.0.80.0100.00616.91
8.0.70.0000.00716.78
8.0.60.0050.00216.71
8.0.50.0070.00016.94
8.0.30.0100.00817.10
8.0.20.0110.00817.40
8.0.10.0050.00216.94
8.0.00.0070.01316.60
7.4.330.0020.00215.55
7.4.320.0030.00316.53
7.4.300.0000.00616.66
7.4.290.0030.00316.60
7.4.280.0060.00316.56
7.4.270.0030.00316.45
7.4.260.0000.00716.47
7.4.250.0000.00816.56
7.4.240.0050.00216.54
7.4.230.0070.00016.41
7.4.220.0080.00816.64
7.4.210.0080.01016.61
7.4.200.0000.00816.55
7.4.160.0060.01016.43
7.4.150.0120.00617.40
7.4.140.0110.01417.86
7.4.130.0100.01116.48
7.4.120.0120.01016.59
7.4.110.0080.00816.59
7.4.100.0100.01416.58
7.4.90.0120.00616.63
7.4.80.0120.01219.39
7.4.70.0040.01316.54
7.4.60.0100.00616.77
7.4.50.0000.01116.26
7.4.40.0060.01116.45
7.4.30.0100.00716.43
7.4.00.0000.01314.86
7.3.330.0000.00613.30
7.3.320.0000.00513.31
7.3.310.0000.00716.33
7.3.300.0060.00316.39
7.3.290.0070.00016.24
7.3.280.0100.00916.34
7.3.270.0110.00817.40
7.3.260.0110.00716.34
7.3.250.0100.00716.44
7.3.240.0090.00916.47
7.3.230.0040.01516.59
7.3.210.0070.01016.32
7.3.200.0120.00916.45
7.3.190.0080.00816.39
7.3.180.0110.00616.42
7.3.170.0100.01316.68
7.3.160.0140.00316.34
7.2.330.0110.00616.63
7.2.320.0070.01616.75
7.2.310.0070.01116.79
7.2.300.0130.00416.36
7.2.290.0040.01316.60
7.2.00.0090.00919.16
7.1.100.0110.01416.42
7.1.70.0040.00417.31
7.1.60.0030.01317.27
7.1.50.0120.00017.11
7.1.40.0110.00016.46
7.1.30.0030.00916.75
7.1.20.0060.00616.89
7.1.10.0030.00516.62
7.1.00.0080.00016.67
7.0.200.0050.00316.61
7.0.190.0050.00316.73
7.0.180.0000.00816.11
7.0.170.0030.00616.32
7.0.160.0000.00816.30
7.0.150.0060.00316.30
7.0.140.0040.00416.34
7.0.130.0000.00816.40
7.0.120.0030.00616.58
7.0.110.0080.00016.58
7.0.100.0000.00916.27
7.0.90.0050.00516.34
7.0.80.0070.00416.44
7.0.70.0020.01016.33
7.0.60.0000.01115.99
7.0.50.0090.00316.33
7.0.40.0070.00215.27
7.0.30.0000.00815.27
7.0.20.0040.00715.27
7.0.10.0030.00515.27
7.0.00.0000.00715.27

preferences:
58.69 ms | 400 KiB | 5 Q