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!<br>\n"; } if ($flags & FLAG_2) { echo "You passed flag 2!<br>\n"; } if ($flags & FLAG_3) { echo "You passed flag 3!<br>\n"; } if ($flags & FLAG_4) { echo "You passed flag 4!<br>\n"; } } show_flags(2 | 1 | FLAG_3); echo 4 == FLAG_3;

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.05
8.3.50.0140.00621.29
8.3.40.0180.00418.61
8.3.30.0130.01018.45
8.3.20.0040.00420.19
8.3.10.0080.00023.61
8.3.00.0080.00017.80
8.2.180.0000.01518.29
8.2.170.0070.00722.96
8.2.160.0140.00020.52
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0030.00617.50
8.2.110.0030.00622.29
8.2.100.0060.00617.59
8.2.90.0000.00817.63
8.2.80.0040.00418.61
8.2.70.0000.00917.50
8.2.60.0040.00417.80
8.2.50.0090.00018.07
8.2.40.0000.00719.37
8.2.30.0000.00720.63
8.2.20.0070.00017.50
8.2.10.0000.00818.00
8.2.00.0000.00717.91
8.1.280.0090.00625.92
8.1.270.0040.01123.83
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0050.00520.06
8.1.230.0040.00817.57
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0000.00817.00
8.1.180.0000.00718.10
8.1.170.0040.00418.32
8.1.160.0000.00722.01
8.1.150.0040.00418.83
8.1.140.0030.00517.35
8.1.130.0030.00317.65
8.1.120.0030.00317.40
8.1.110.0080.00017.35
8.1.100.0080.00017.39
8.1.90.0000.00717.41
8.1.80.0040.00417.30
8.1.70.0030.00317.33
8.1.60.0090.00017.41
8.1.50.0040.00417.39
8.1.40.0060.00317.45
8.1.30.0030.00717.57
8.1.20.0040.00417.52
8.1.10.0000.00717.54
8.1.00.0040.00417.45
8.0.300.0000.00718.77
8.0.290.0070.00016.63
8.0.280.0000.00818.30
8.0.270.0000.00717.12
8.0.260.0000.00617.21
8.0.250.0040.00416.86
8.0.240.0000.00716.95
8.0.230.0020.00516.86
8.0.220.0030.00316.83
8.0.210.0000.00816.86
8.0.200.0060.00016.87
8.0.190.0000.00716.83
8.0.180.0070.00016.84
8.0.170.0080.00016.88
8.0.160.0000.00816.77
8.0.150.0030.00316.70
8.0.140.0040.00416.71
8.0.130.0050.00013.30
8.0.120.0000.00816.80
8.0.110.0060.00316.85
8.0.100.0030.00516.82
8.0.90.0040.00416.90
8.0.80.0100.00516.86
8.0.70.0030.00416.93
8.0.60.0070.00016.71
8.0.50.0000.00716.75
8.0.30.0130.00416.98
8.0.20.0110.00817.40
8.0.10.0000.00716.83
8.0.00.0140.00716.66
7.4.330.0060.00015.08
7.4.320.0030.00316.54
7.4.300.0000.00616.60
7.4.290.0000.00716.47
7.4.280.0040.00416.54
7.4.270.0070.00016.50
7.4.260.0040.00416.36
7.4.250.0000.00716.55
7.4.240.0040.00316.43
7.4.230.0030.00316.65
7.4.220.0110.00616.49
7.4.210.0070.00716.44
7.4.200.0030.00316.41
7.4.160.0130.00316.45
7.4.150.0070.01017.40
7.4.140.0150.01117.86
7.4.130.0090.00916.51
7.4.120.0100.00716.48
7.4.110.0100.01516.65
7.4.100.0180.00316.30
7.4.90.0140.00316.33
7.4.80.0120.00919.39
7.4.70.0060.01016.59
7.4.60.0030.01316.36
7.4.50.0050.00316.50
7.4.40.0110.00616.38
7.4.30.0100.00616.67
7.4.00.0070.00715.15
7.3.330.0050.00013.09
7.3.320.0030.00313.15
7.3.310.0000.00716.36
7.3.300.0070.00016.32
7.3.290.0030.01016.25
7.3.280.0100.01116.33
7.3.270.0070.01117.40
7.3.260.0100.01516.50
7.3.240.0100.01016.62
7.3.230.0070.01416.43
7.3.210.0090.00616.37
7.3.200.0030.01316.59
7.3.190.0130.00316.61
7.3.180.0090.00616.57
7.3.170.0110.00516.49
7.3.160.0060.01016.39
7.3.10.0060.00616.65
7.3.00.0070.00616.60
7.2.330.0130.01016.79
7.2.320.0150.00916.75
7.2.310.0120.00616.78
7.2.300.0030.01316.84
7.2.290.0090.00616.46
7.2.130.0090.00717.04
7.2.120.0060.00816.80
7.2.110.0060.00516.84
7.2.100.0020.01116.83
7.2.90.0060.00616.92
7.2.80.0030.01116.83
7.2.70.0070.00816.74
7.2.60.0110.00216.86
7.2.50.0030.01316.80
7.2.40.0030.01116.69
7.2.30.0030.00916.95
7.2.20.0030.00816.84
7.2.10.0060.00616.97
7.2.00.0020.01017.65
7.1.250.0050.00815.78
7.1.100.0000.01118.08
7.1.70.0000.00917.09
7.1.60.0210.00419.50
7.1.50.0210.01734.89
7.1.00.0000.08022.27
7.0.200.0000.01016.89
7.0.60.0030.07721.69
7.0.50.0000.05717.74
7.0.40.0030.05720.40
7.0.30.0370.06320.07
7.0.20.0300.05020.10
7.0.10.0070.09020.25
7.0.00.0130.04320.06
5.6.280.0030.04020.78
5.6.210.0100.05320.56
5.6.200.0070.08018.20
5.6.190.0030.05020.48
5.6.180.0270.08020.55
5.6.170.0330.07020.55
5.6.160.0030.05020.48
5.6.150.0100.08018.19
5.6.140.0100.07718.14
5.6.130.0100.08018.23
5.6.120.0030.08720.90
5.6.110.0100.08321.02
5.6.100.0070.05721.00
5.6.90.0070.08320.88
5.6.80.0100.07720.38
5.5.350.0330.06720.30
5.5.340.0000.06718.02
5.5.330.0030.04320.14
5.5.320.0170.05020.31
5.5.310.0370.07320.19
5.5.300.0000.04018.07
5.5.290.0070.09017.96
5.5.280.0100.03720.78
5.5.270.0130.08020.65
5.5.260.0070.08320.68
5.5.250.0100.08720.55
5.5.240.0030.06320.25
5.4.450.0800.06019.61
5.4.440.1100.06019.60
5.4.430.0900.05719.68
5.4.420.0830.05019.33
5.4.410.0870.07019.43
5.4.400.0830.04719.01
5.4.390.0870.06719.26
5.4.380.0830.05019.13
5.4.370.0830.07719.16
5.4.360.0800.07318.84
5.4.350.0530.04719.05
5.4.340.0200.04718.88
5.4.320.0200.06019.23
5.4.310.0830.07719.25
5.4.300.0630.05719.25
5.4.290.0500.05319.06
5.4.280.0100.05719.25
5.4.270.0100.06018.98
5.4.260.0700.06718.86
5.4.250.0400.06019.36
5.4.240.0030.06719.25
5.4.230.0130.06019.22
5.4.220.0530.07019.14
5.4.210.0670.05719.26
5.4.200.0670.06019.00
5.4.190.0830.05319.35
5.4.180.0870.05319.21
5.4.170.0830.06319.27
5.4.160.0770.06319.23
5.4.150.0630.08319.27
5.4.140.0830.07316.48
5.4.130.0800.06716.44
5.4.120.0730.07316.48
5.4.110.0800.06716.57
5.4.100.0530.06716.67
5.4.90.0630.05016.65
5.4.80.0770.04316.68
5.4.70.0030.07316.62
5.4.60.0130.04016.52
5.4.50.0230.07016.33
5.4.40.0330.04316.42
5.4.30.0000.05716.42
5.4.20.0030.07316.42
5.4.10.0270.06716.27

preferences:
51.15 ms | 401 KiB | 5 Q