3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bit2chr_mask(string $flags, int $bitmask): string { $chrmask = ''; for($bit = 1, $i = 0; $bit <= $bitmask; $bit <<= 1, $i++) { if($bitmask & $bit){ $chrmask .= $flags[$i]; } } return $chrmask; } var_dump(bit2chr_mask('abcdefghijklmnopqrstuvwxyz1234567890', 2147483648));

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.80.0040.00418.43
8.3.70.0160.00316.50
8.3.60.0090.00918.42
8.3.50.0100.00718.38
8.3.40.0120.00318.86
8.3.30.0090.00618.54
8.3.20.0080.00021.74
8.3.10.0050.00323.65
8.3.00.0000.00822.08
8.2.200.0040.00418.29
8.2.190.0110.00716.75
8.2.180.0090.00616.88
8.2.170.0040.01122.96
8.2.160.0160.00320.30
8.2.150.0020.00524.18
8.2.140.0040.00424.66
8.2.130.0070.00426.16
8.2.120.0000.00820.65
8.2.110.0040.00721.13
8.2.100.0070.00417.66
8.2.90.0080.00017.91
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0000.00818.03
8.2.50.0040.00418.07
8.2.40.0000.00918.09
8.2.30.0000.00718.01
8.2.20.0040.00417.95
8.2.10.0040.00417.90
8.2.00.0000.00718.08
8.1.290.0060.00330.84
8.1.280.0100.01025.92
8.1.270.0080.00022.08
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00322.48
8.1.230.0070.00422.66
8.1.220.0000.00817.74
8.1.210.0000.00818.88
8.1.200.0000.01217.23
8.1.190.0000.00817.23
8.1.180.0030.00618.10
8.1.170.0030.00618.64
8.1.160.0050.00318.80
8.1.150.0040.00422.03
8.1.140.0000.00717.65
8.1.130.0070.00019.02
8.1.120.0040.00717.45
8.1.110.0040.00417.38
8.1.100.0000.00717.32
8.1.90.0040.00417.37
8.1.80.0000.00817.35
8.1.70.0040.00417.39
8.1.60.0030.00517.50
8.1.50.0000.00817.59
8.1.40.0000.00817.48
8.1.30.0030.00817.69
8.1.20.0040.00417.55
8.1.10.0050.00317.62
8.1.00.0040.00417.49
8.0.300.0030.00519.91
8.0.290.0060.00316.63
8.0.280.0000.00718.32
8.0.270.0030.00617.25
8.0.260.0000.00616.77
8.0.250.0050.00216.77
8.0.240.0040.00416.94
8.0.230.0060.00316.87
8.0.220.0040.00416.84
8.0.210.0050.00316.75
8.0.200.0030.00316.92
8.0.190.0080.00016.90
8.0.180.0030.00416.79
8.0.170.0030.00616.89
8.0.160.0040.00416.86
8.0.150.0040.00416.82
8.0.140.0030.00316.70
8.0.130.0000.00513.32
8.0.120.0080.00016.87
8.0.110.0040.00416.79
8.0.100.0070.00016.90
8.0.90.0000.00716.76
8.0.80.0060.01216.76
8.0.70.0070.00016.79
8.0.60.0040.00416.73
8.0.50.0040.00416.76
8.0.30.0110.00717.04
8.0.20.0130.00617.40
8.0.10.0000.00716.96
8.0.00.0140.00516.91
7.4.330.0020.00215.55
7.4.320.0030.00316.46
7.4.300.0000.00616.53
7.4.290.0000.00716.61
7.4.280.0040.00416.61
7.4.270.0040.00416.65
7.4.260.0080.00016.52
7.4.250.0040.00416.59
7.4.240.0000.00716.38
7.4.230.0000.00716.57
7.4.220.0030.00616.49
7.4.210.0110.00516.57
7.4.200.0030.00316.50
7.4.160.0100.00916.50
7.4.140.0070.01117.86
7.4.130.0110.00716.72
7.4.120.0070.01216.47
7.4.110.0070.01816.45
7.4.100.0090.00916.54
7.4.90.0120.00416.47
7.4.80.0060.01319.39
7.4.70.0130.00316.52
7.4.60.0090.01216.51
7.4.50.0060.01016.67
7.4.40.0130.00316.64
7.4.00.0120.00315.10
7.3.330.0040.00413.15
7.3.320.0030.00313.32
7.3.310.0000.00716.21
7.3.300.0070.00016.19
7.3.290.0040.00416.16
7.3.280.0070.01116.31
7.3.260.0090.01216.56
7.3.240.0070.01016.44
7.3.230.0020.02316.40
7.3.210.0060.00916.46
7.3.200.0110.00516.43
7.3.190.0110.00816.49
7.3.180.0070.01016.31
7.3.170.0000.01716.45
7.3.160.0090.00616.36
7.3.10.0050.01116.45
7.3.00.0060.00516.45
7.2.330.0140.00316.45
7.2.320.0110.00716.48
7.2.310.0070.01016.79
7.2.300.0070.01116.61
7.2.290.0150.00816.61
7.2.130.0110.00516.82
7.2.120.0040.00716.90
7.2.110.0100.00116.92
7.2.100.0020.01316.89
7.2.90.0060.00516.99
7.2.80.0090.00716.87
7.2.70.0030.00816.89
7.2.60.0070.00816.90
7.2.50.0040.00916.85
7.2.40.0060.00416.87
7.2.30.0070.00617.84
7.2.20.0070.01017.97
7.2.10.0040.01117.94
7.2.00.0060.00817.82
7.1.250.0060.00815.71
7.1.200.0030.01015.79
7.1.150.0100.00618.93
7.1.140.0080.00918.57
7.1.130.0090.01318.84
7.1.120.0060.01118.54
7.1.110.0050.01018.16
7.1.100.0100.01018.20
7.1.90.0070.00818.36
7.1.80.0100.00618.24
7.1.70.0050.01017.20
7.1.60.0270.01135.06
7.1.50.0190.01534.73
7.1.40.0250.01134.21
7.1.30.0220.01534.55
7.1.20.0280.01734.48
7.1.10.0050.01116.65
7.1.00.0040.01016.64

preferences:
27.45 ms | 401 KiB | 5 Q