3v4l.org

run code in 300+ PHP versions simultaneously
<?php const FLAG_1 = 0b0001; // 1 const FLAG_2 = 0b0010; // 2 const FLAG_3 = 0b0100; // 4 const FLAG_4 = 0b1000; // 8 // Can you see the pattern? ;-) function show_flags ($flags) { if ($flags & FLAG_1) { echo "You passed flag 1!\n"; } if ($flags & FLAG_2) { echo "You passed flag 2!\n"; } if ($flags & FLAG_3) { echo "You passed flag 3!\n"; } if ($flags & FLAG_4) { echo "You passed flag 4!\n"; } } show_flags(decbin(2));

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.0100.01016.63
8.3.50.0070.01318.02
8.3.40.0070.00718.81
8.3.30.0110.00418.47
8.3.20.0080.00020.39
8.3.10.0050.00221.82
8.3.00.0040.00420.97
8.2.180.0070.01316.38
8.2.170.0120.00322.96
8.2.160.0090.01220.57
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00421.07
8.2.120.0070.00026.35
8.2.110.0060.00319.21
8.2.100.0110.00017.59
8.2.90.0000.00819.75
8.2.80.0040.00417.97
8.2.70.0030.00517.80
8.2.60.0030.00517.63
8.2.50.0040.00418.10
8.2.40.0000.00820.59
8.2.30.0000.00719.19
8.2.20.0040.00417.95
8.2.10.0000.00718.05
8.2.00.0000.00917.55
8.1.280.0100.01025.92
8.1.270.0060.00322.20
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0060.00322.42
8.1.230.0040.00721.03
8.1.220.0000.00717.74
8.1.210.0000.00818.77
8.1.200.0040.00417.00
8.1.190.0080.00017.13
8.1.180.0040.00418.10
8.1.170.0040.00418.51
8.1.160.0040.00418.88
8.1.150.0040.00422.03
8.1.140.0070.00019.43
8.1.130.0070.00017.65
8.1.120.0000.00717.40
8.1.110.0050.00317.34
8.1.100.0030.00617.30
8.1.90.0000.00917.29
8.1.80.0000.00717.45
8.1.70.0000.00817.38
8.1.60.0000.00917.56
8.1.50.0000.00817.47
8.1.40.0060.00317.45
8.1.30.0040.00417.43
8.1.20.0030.00517.60
8.1.10.0000.00717.34
8.1.00.0040.00417.24
8.0.300.0040.00419.90
8.0.290.0000.00816.63
8.0.280.0030.00318.30
8.0.270.0030.00317.19
8.0.260.0040.00417.11
8.0.250.0000.00716.77
8.0.240.0070.00016.81
8.0.230.0000.00716.82
8.0.220.0000.00716.72
8.0.210.0070.00016.84
8.0.200.0030.00316.89
8.0.190.0080.00016.88
8.0.180.0040.00416.83
8.0.170.0000.00716.86
8.0.160.0040.00416.73
8.0.150.0040.00416.79
8.0.140.0000.00716.70
8.0.130.0060.00013.29
8.0.120.0000.00816.75
8.0.110.0040.00416.68
8.0.100.0000.00816.70
8.0.90.0050.00316.70
8.0.80.0100.00616.80
8.0.70.0080.00016.69
8.0.60.0070.00016.77
8.0.50.0040.00416.84
8.0.30.0080.01317.04
8.0.20.0110.00817.40
8.0.10.0030.00516.96
8.0.00.0110.00616.77
7.4.330.0020.00215.55
7.4.320.0060.00016.50
7.4.300.0030.00316.47
7.4.290.0060.00316.53
7.4.280.0000.00716.47
7.4.270.0070.00016.50
7.4.260.0000.00716.52
7.4.250.0070.00016.40
7.4.240.0040.00416.51
7.4.230.0050.00316.19
7.4.220.0090.00916.43
7.4.210.0110.00416.50
7.4.200.0050.00216.52
7.4.160.0050.01216.52
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0090.00816.45
7.4.120.0070.01016.40
7.4.110.0070.01016.34
7.4.100.0100.00616.50
7.4.90.0090.00916.37
7.4.80.0030.01219.39
7.4.70.0120.00516.59
7.4.60.0060.01016.51
7.4.50.0000.01416.36
7.4.40.0100.00616.69
7.4.30.0060.01216.58
7.4.00.0030.01515.06
7.3.330.0020.00213.25
7.3.320.0000.00513.28
7.3.310.0000.00616.29
7.3.300.0030.00316.18
7.3.290.0080.00616.26
7.3.280.0110.00716.32
7.3.270.0040.01317.40
7.3.260.0100.00716.56
7.3.250.0060.01416.51
7.3.240.0060.01316.36
7.3.230.0070.01016.39
7.3.210.0060.00916.40
7.3.200.0110.00716.43
7.3.190.0120.01016.31
7.3.180.0030.01316.44
7.3.170.0130.00316.40
7.3.160.0090.00916.24
7.2.330.0070.01116.79
7.2.320.0110.01116.80
7.2.310.0090.01216.74
7.2.300.0160.00316.70
7.2.290.0050.01116.61
7.2.60.0000.01416.63
7.2.00.0070.00719.65
7.1.200.0040.00415.59
7.1.100.0120.00017.94
7.1.70.0030.00616.89
7.1.60.0000.01017.15
7.1.00.0000.07722.31
7.0.200.0200.00914.91
7.0.130.0100.05722.18
7.0.120.0070.05722.02
7.0.110.0000.06322.04
7.0.100.0070.05722.07
7.0.90.0100.05722.06
7.0.80.0030.05722.07
7.0.70.0100.05022.03
7.0.60.0030.06022.08
7.0.50.0070.06022.07
7.0.40.0130.05322.12
7.0.30.0030.07722.11
7.0.20.0130.06022.11
7.0.10.0130.05022.14
7.0.00.0070.08322.14
5.6.280.0100.06020.98
5.6.270.0000.06320.92
5.6.260.0030.05721.14
5.6.250.0070.05320.87
5.6.240.0130.05020.89
5.6.230.0100.05720.88
5.6.220.0170.04721.06
5.6.210.0000.08021.05
5.6.200.0030.07021.07
5.6.190.0070.06720.84
5.6.180.0130.05021.04
5.6.170.0130.06721.04
5.6.160.0100.05021.00
5.6.150.0100.05721.05
5.6.140.0100.06020.85
5.6.130.0170.04721.01
5.6.120.0100.05720.94
5.6.110.0070.05721.05
5.6.100.0030.06320.96
5.6.90.0070.05721.01
5.6.80.0030.05320.39
5.6.70.0100.04720.38
5.6.60.0100.06020.38
5.6.50.0070.05020.14
5.6.40.0030.06020.12
5.6.30.0100.05720.43
5.6.20.0100.05320.35
5.6.10.0100.05320.36
5.6.00.0070.05020.44

preferences:
51.04 ms | 400 KiB | 5 Q