3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 10000; $b = 11111; $c = $a & $b; $r = $a ^ $b; var_dump(decbin($a), decbin($b), decbin($c), decbin($r), '---'); while ($c) { $shift = $c << 1; $c = $r & $shift; $r ^= $shift; var_dump(decbin($shift), decbin($c), decbin($r), '---'); } var_dump($r);

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.0040.01118.18
8.3.50.0100.01022.11
8.3.40.0060.00918.66
8.3.30.0040.01118.82
8.3.20.0000.00720.21
8.3.10.0050.00221.60
8.3.00.0080.00019.07
8.2.180.0150.00618.17
8.2.170.0070.01422.96
8.2.160.0130.00022.25
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0140.00326.16
8.2.120.0040.00419.55
8.2.110.0030.00622.04
8.2.100.0040.00719.63
8.2.90.0050.00319.63
8.2.80.0000.00818.04
8.2.70.0000.00818.02
8.2.60.0040.00418.09
8.2.50.0040.00418.10
8.2.40.0080.00022.14
8.2.30.0040.00419.30
8.2.20.0040.00417.74
8.2.10.0000.00718.05
8.2.00.0050.00217.72
8.1.280.0030.01025.92
8.1.270.0050.00318.85
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00020.50
8.1.230.0030.00922.67
8.1.220.0000.00818.98
8.1.210.0050.00318.77
8.1.200.0050.00517.22
8.1.190.0040.00417.09
8.1.180.0070.00018.10
8.1.170.0050.00318.90
8.1.160.0030.00720.19
8.1.150.0040.00418.86
8.1.140.0000.00717.42
8.1.130.0000.00917.82
8.1.120.0040.00417.39
8.1.110.0040.00417.36
8.1.100.0000.00717.36
8.1.90.0000.00717.32
8.1.80.0050.00217.37
8.1.70.0040.00417.33
8.1.60.0050.00317.43
8.1.50.0040.00417.54
8.1.40.0080.00017.46
8.1.30.0000.00817.65
8.1.20.0000.00817.65
8.1.10.0030.00617.45
8.1.00.0100.00017.37
8.0.300.0040.00421.93
8.0.290.0040.00816.63
8.0.280.0070.00018.21
8.0.270.0000.00917.10
8.0.260.0030.00317.19
8.0.250.0050.00216.87
8.0.240.0000.00716.85
8.0.230.0070.00016.79
8.0.220.0030.00316.68
8.0.210.0030.00316.81
8.0.200.0030.00316.84
8.0.190.0080.00016.84
8.0.180.0030.00516.89
8.0.170.0030.00616.75
8.0.160.0040.00416.84
8.0.150.0030.00416.84
8.0.140.0070.00016.82
8.0.130.0050.00313.16
8.0.120.0060.00316.82
8.0.110.0030.00316.78
8.0.100.0040.00416.81
8.0.90.0030.00516.71
8.0.80.0060.00916.86
8.0.70.0000.00716.67
8.0.60.0000.00716.79
8.0.50.0040.00416.59
8.0.30.0130.01016.91
8.0.20.0100.01317.40
8.0.10.0040.00416.97
8.0.00.0140.00816.62
7.4.330.0020.00215.03
7.4.320.0000.00616.35
7.4.300.0060.00016.52
7.4.290.0040.00416.51
7.4.280.0050.00316.53
7.4.270.0030.00316.51
7.4.260.0030.00316.41
7.4.250.0000.00716.44
7.4.240.0020.00516.43
7.4.230.0030.00316.63
7.4.220.0090.01316.38
7.4.210.0070.00716.63
7.4.200.0030.00316.33
7.4.160.0030.01216.31
7.4.150.0080.01117.40
7.4.140.0080.00917.86
7.4.130.0110.00616.46
7.4.120.0110.00616.51
7.4.110.0090.00916.19
7.4.100.0200.00016.50
7.4.90.0130.01116.38
7.4.80.0080.01219.39
7.4.70.0090.00916.42
7.4.60.0060.00916.47
7.4.50.0030.00516.24
7.4.40.0120.00416.61
7.4.30.0070.01116.33
7.4.00.0040.01114.68
7.3.330.0050.00013.09
7.3.320.0000.00613.17
7.3.310.0050.00316.32
7.3.300.0030.00316.10
7.3.290.0070.00716.29
7.3.280.0090.00916.25
7.3.270.0040.01417.40
7.3.260.0090.00916.21
7.3.250.0100.00916.38
7.3.240.0090.00916.57
7.3.230.0040.01516.61
7.3.210.0070.01016.36
7.3.200.0130.00319.39
7.3.190.0060.00916.23
7.3.180.0070.01016.51
7.3.170.0090.01516.54
7.3.160.0030.01216.27
7.3.00.0070.00716.57
7.2.330.0090.00916.70
7.2.320.0160.00316.36
7.2.310.0110.00716.53
7.2.300.0160.00016.73
7.2.290.0160.00316.59
7.2.130.0120.00916.67
7.2.120.0120.00616.90
7.2.110.0070.01116.61
7.2.100.0100.00716.88
7.2.90.0030.01016.95
7.2.80.0130.00716.81
7.2.70.0080.00816.85
7.2.60.0070.00816.83
7.2.50.0070.00716.68
7.2.40.0120.00316.75
7.2.30.0040.01116.79
7.2.20.0000.01416.77
7.2.10.0070.00716.93
7.2.00.0060.00917.98
7.1.250.0070.00715.77
7.1.240.0070.01015.65
7.1.230.0100.00715.65
7.1.220.0040.00815.88
7.1.210.0130.00315.69
7.1.200.0070.00615.79
7.1.190.0130.00615.85
7.1.180.0030.01315.80
7.1.170.0070.00615.65
7.1.160.0100.00715.96
7.1.150.0100.00715.68
7.1.140.0100.00615.73
7.1.130.0150.00015.65
7.1.120.0120.00316.03
7.1.110.0060.00615.64
7.1.100.0060.00716.96
7.1.90.0080.00315.67
7.1.80.0070.00715.46
7.1.70.0060.00516.41
7.1.60.0050.00817.34
7.1.50.0050.00816.06
7.1.40.0100.00315.59
7.1.30.0060.00915.68
7.1.20.0130.00315.43
7.1.10.0070.00715.76
7.1.00.0020.04419.11
7.0.330.0000.01215.46
7.0.320.0080.00415.22
7.0.310.0120.00315.10
7.0.300.0090.00615.28
7.0.290.0100.00315.32
7.0.280.0100.00315.49
7.0.270.0060.00915.30
7.0.260.0060.00615.38
7.0.250.0110.00415.07
7.0.240.0150.00015.10
7.0.230.0030.00615.05
7.0.220.0030.01315.12
7.0.210.0090.00615.25
7.0.200.0060.00515.86
7.0.190.0110.00415.45
7.0.180.0130.00615.36
7.0.170.0100.00315.29
7.0.160.0090.00615.18
7.0.150.0100.00715.24
7.0.140.0050.03918.68
7.0.130.0170.00015.18
7.0.120.0080.00415.41
7.0.110.0110.00315.29
7.0.100.0110.00315.07
7.0.90.0120.00614.89
7.0.80.0060.00615.26
7.0.70.0130.00715.11
7.0.60.0090.04517.47
7.0.50.0100.02816.61
7.0.40.0100.02516.74
7.0.30.0160.03116.69
7.0.20.0180.03816.72
7.0.10.0110.03016.80
7.0.00.0060.04616.75
5.6.380.0030.01214.37
5.6.370.0040.00714.46
5.6.360.0100.00614.23
5.6.350.0110.00414.34
5.6.340.0110.00314.28
5.6.330.0100.00714.11
5.6.320.0080.00814.27
5.6.310.0080.00814.29
5.6.300.0070.00714.18
5.6.290.0000.01214.46
5.6.280.0050.03817.49
5.6.270.0030.00714.21
5.6.260.0120.00014.11
5.6.250.0100.00314.09
5.6.240.0090.00614.32
5.6.230.0070.00714.11
5.6.220.0040.00714.07
5.6.210.0070.04217.39
5.6.200.0100.04416.21
5.6.190.0030.04517.32
5.6.180.0050.04717.35
5.6.170.0250.03817.35
5.6.160.0140.02317.32
5.6.150.0070.03416.13
5.6.140.0020.02516.19
5.6.130.0060.03816.24
5.6.120.0030.02617.63
5.6.110.0070.04517.55
5.6.100.0090.02217.57
5.6.90.0080.04117.60
5.6.80.0030.04817.13
5.6.70.0100.00314.03
5.6.60.0030.01014.38
5.6.50.0030.00614.33
5.6.40.0040.00814.28
5.6.30.0000.01113.85
5.6.20.0070.00714.12
5.6.10.0030.01414.16
5.6.00.0100.00314.13
5.5.380.0120.00010.81
5.5.370.0030.01010.68
5.5.360.0000.00910.79
5.5.350.0020.04715.44
5.5.340.0060.04214.32
5.5.330.0060.02115.54
5.5.320.0160.03315.49
5.5.310.0100.02615.36
5.5.300.0070.02814.24
5.5.290.0040.03414.31
5.5.280.0030.03015.77
5.5.270.0070.04015.95
5.5.260.0070.04515.93
5.5.250.0100.04115.79
5.5.240.0080.03815.45
5.5.230.0080.00410.86
5.5.220.0000.00810.75
5.5.210.0030.00311.14
5.5.200.0000.01011.19
5.5.190.0000.01011.14
5.5.180.0060.00610.92
5.5.170.0040.00410.99
5.5.160.0060.00610.97
5.5.150.0040.00810.75
5.5.140.0070.00010.91
5.5.130.0030.00610.80
5.5.120.0080.00410.82
5.5.110.0000.01011.02
5.5.100.0000.00910.74
5.5.90.0040.00710.95
5.5.80.0060.00610.79
5.5.70.0040.00411.11
5.5.60.0040.00710.94
5.5.50.0040.00810.96
5.5.40.0110.00310.98
5.5.30.0000.01210.85
5.5.20.0000.01410.68
5.5.10.0080.00510.81
5.5.00.0000.00810.88
5.4.450.0330.03215.08
5.4.440.0070.03214.89
5.4.430.0540.02315.12
5.4.420.0400.03015.21
5.4.410.0370.03915.20
5.4.400.0430.02715.13
5.4.390.0450.03315.08
5.4.380.0170.03414.75
5.4.370.0200.02414.68
5.4.360.0090.03214.77
5.4.350.0150.04014.53
5.4.340.0150.02814.84
5.4.330.0040.00710.67
5.4.320.0160.03814.52
5.4.310.0170.03514.74
5.4.300.0110.03114.75
5.4.290.0110.03314.64
5.4.280.0170.03514.66
5.4.270.0140.02714.72
5.4.260.0150.02714.62
5.4.250.0080.04014.53
5.4.240.0050.03914.55
5.4.230.0080.03114.69
5.4.220.0140.02914.55
5.4.210.0140.02414.43
5.4.200.0130.02513.59
5.4.190.0080.03214.70
5.4.180.0070.03714.63
5.4.170.0170.02814.48
5.4.160.0170.02414.66
5.4.150.0110.03014.60
5.4.140.0250.02313.44
5.4.130.0100.03013.43
5.4.120.0150.02713.67
5.4.110.0180.03113.34
5.4.100.0160.02313.50
5.4.90.0110.03313.46
5.4.80.0140.02813.37
5.4.70.0310.03213.56
5.4.60.0240.03513.72
5.4.50.0190.02813.58
5.4.40.0310.02313.53
5.4.30.0220.02813.62
5.4.20.0240.02713.47
5.4.10.0250.02713.43
5.4.00.0230.02313.19
5.3.290.0100.03512.48
5.3.280.0220.02812.47
5.3.270.0120.03912.48
5.3.260.0070.03412.51
5.3.250.0170.03812.57
5.3.240.0170.03212.59
5.3.230.0100.02712.41
5.3.220.0080.02912.45
5.3.210.0060.03412.45
5.3.200.0130.02912.43
5.3.190.0120.02912.46
5.3.180.0180.02812.58
5.3.170.0300.02812.50
5.3.160.0170.02812.54
5.3.150.0290.02812.43
5.3.140.0190.02612.51
5.3.130.0150.03612.53
5.3.120.0190.02612.50
5.3.110.0250.02712.51
5.3.100.0220.02512.31
5.3.90.0250.02812.23
5.3.80.0190.03212.18
5.3.70.0120.03512.12
5.3.60.0130.03012.28
5.3.50.0120.02912.11
5.3.40.0100.03112.05
5.3.30.0100.03012.13
5.3.20.0110.02511.97
5.3.10.0110.02711.92
5.3.00.0160.02511.92
5.2.170.0070.02510.69
5.2.160.0130.01710.68
5.2.150.0060.02310.68
5.2.140.0100.02510.72
5.2.130.0070.02410.75
5.2.120.0100.02310.66
5.2.110.0110.02010.70
5.2.100.0100.02210.75
5.2.90.0100.03010.66
5.2.80.0110.02810.66
5.2.70.0030.03010.65
5.2.60.0120.02310.61
5.2.50.0190.02810.65
5.2.40.0160.01710.61
5.2.30.0110.02910.61
5.2.20.0110.02910.63
5.2.10.0100.02710.58
5.2.00.0200.02310.48
5.1.60.0130.02610.13
5.1.50.0120.02310.11
5.1.40.0160.02010.11
5.1.30.0120.02310.29
5.1.20.0050.02510.29
5.1.10.0080.02010.21
5.1.00.0150.02210.17
5.0.50.0060.0239.46
5.0.40.0030.0199.34
5.0.30.0030.0289.26
5.0.20.0070.0189.25
5.0.10.0120.0109.23
5.0.00.0080.0219.30
4.4.90.0050.0138.07
4.4.80.0040.0148.08
4.4.70.0050.0138.07
4.4.60.0050.0138.08
4.4.50.0050.0138.08
4.4.40.0100.0188.08
4.4.30.0030.0148.06
4.4.20.0100.0108.11
4.4.10.0030.0138.08
4.4.00.0060.0178.08
4.3.110.0050.0138.05
4.3.100.0050.0138.01
4.3.90.0080.0088.02
4.3.80.0020.0228.08
4.3.70.0040.0138.02
4.3.60.0050.0138.03
4.3.50.0010.0158.08
4.3.40.0020.0238.01
4.3.30.0070.0107.41
4.3.20.0020.0147.40
4.3.10.0040.0137.38
4.3.00.0050.0118.93

preferences:
60.57 ms | 401 KiB | 5 Q