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(0b1011);

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.70.0080.00816.75
8.3.60.0180.00416.63
8.3.50.0200.00821.95
8.3.40.0110.00318.69
8.3.30.0070.00718.58
8.3.20.0080.00018.52
8.3.10.0000.00722.04
8.3.00.0040.00420.96
8.2.180.0070.01316.32
8.2.170.0110.00422.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00421.00
8.2.120.0040.00426.35
8.2.110.0040.00822.25
8.2.100.0080.00417.59
8.2.90.0040.00417.63
8.2.80.0060.00318.78
8.2.70.0030.00617.93
8.2.60.0040.00417.50
8.2.50.0030.00519.82
8.2.40.0000.00820.55
8.2.30.0040.00419.18
8.2.20.0040.00418.05
8.2.10.0040.00418.05
8.2.00.0030.00617.59
8.1.280.0170.00325.92
8.1.270.0040.00422.06
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0060.00323.83
8.1.230.0080.00417.42
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0030.00517.25
8.1.190.0050.00517.10
8.1.180.0000.00718.10
8.1.170.0030.00618.39
8.1.160.0040.00418.82
8.1.150.0000.00721.96
8.1.140.0000.00719.52
8.1.130.0000.00717.64
8.1.120.0030.00317.40
8.1.110.0070.00017.35
8.1.100.0070.00317.32
8.1.90.0000.00817.37
8.1.80.0070.00017.47
8.1.70.0000.00717.38
8.1.60.0040.00417.44
8.1.50.0040.00417.48
8.1.40.0050.00317.34
8.1.30.0050.00317.56
8.1.20.0040.00417.63
8.1.10.0000.00717.38
8.1.00.0000.00817.43
8.0.300.0000.00718.77
8.0.290.0040.00416.63
8.0.280.0030.00318.44
8.0.270.0030.00517.19
8.0.260.0040.00417.07
8.0.250.0040.00416.89
8.0.240.0030.00316.84
8.0.230.0040.00416.88
8.0.220.0030.00316.70
8.0.210.0040.00416.82
8.0.200.0030.00316.88
8.0.190.0110.00016.84
8.0.180.0050.00316.75
8.0.170.0000.00716.89
8.0.160.0030.00316.85
8.0.150.0070.00016.64
8.0.140.0040.00416.79
8.0.130.0040.00413.25
8.0.120.0040.00416.74
8.0.110.0000.00716.75
8.0.100.0040.00416.72
8.0.90.0000.00816.86
8.0.80.0060.01016.71
8.0.70.0000.00916.78
8.0.60.0070.00016.80
8.0.50.0070.00016.79
8.0.30.0130.00616.94
8.0.20.0110.00917.40
8.0.10.0030.00317.01
8.0.00.0100.00716.68
7.4.330.0050.00015.55
7.4.320.0030.00316.49
7.4.300.0060.00016.55
7.4.290.0070.00016.44
7.4.280.0070.00016.43
7.4.270.0030.00316.50
7.4.260.0000.00716.39
7.4.250.0000.00716.35
7.4.240.0040.00416.43
7.4.230.0030.00316.52
7.4.220.0080.00916.41
7.4.210.0030.01216.46
7.4.200.0050.00216.33
7.4.160.0090.00716.22
7.4.150.0120.00617.40
7.4.140.0100.00917.86
7.4.130.0080.00916.54
7.4.120.0050.01316.54
7.4.110.0110.00716.43
7.4.100.0070.01416.56
7.4.90.0190.00016.73
7.4.80.0080.00819.39
7.4.70.0110.00816.39
7.4.60.0080.00816.47
7.4.50.0060.00916.34
7.4.40.0120.00616.48
7.4.30.0070.01016.50
7.4.00.0000.01714.97
7.3.330.0030.00313.25
7.3.320.0030.00313.12
7.3.310.0030.00316.23
7.3.300.0030.00316.29
7.3.290.0080.00816.28
7.3.280.0100.01016.28
7.3.270.0100.00717.40
7.3.260.0070.01216.43
7.3.250.0110.00916.52
7.3.240.0140.00316.44
7.3.230.0110.01116.39
7.3.210.0030.01316.50
7.3.200.0130.00516.28
7.3.190.0080.00816.36
7.3.180.0090.00616.59
7.3.170.0100.00516.45
7.3.160.0090.00916.42
7.3.10.0120.00416.85
7.3.00.0000.01116.75
7.2.330.0160.00316.54
7.2.320.0100.00716.51
7.2.310.0090.01316.79
7.2.300.0080.01216.75
7.2.290.0040.01216.51
7.2.130.0120.00016.75
7.2.120.0080.00417.00
7.2.110.0100.00016.83
7.2.100.0080.00616.96
7.2.90.0080.00817.17
7.2.80.0060.00317.03
7.2.70.0060.00916.95
7.2.60.0070.00716.96
7.2.50.0030.01416.73
7.2.40.0090.00616.77
7.2.30.0110.00316.58
7.2.20.0090.00616.67
7.2.10.0110.00416.56
7.2.00.0050.00818.07
7.1.250.0030.01015.73
7.1.70.0070.00017.14
7.1.60.0030.00717.07
7.1.00.0000.08022.45
7.0.200.0290.00314.77
7.0.130.0170.05022.18
7.0.120.0070.05722.09
7.0.110.0100.06022.04
7.0.100.0030.08321.96
7.0.90.0100.05722.20
7.0.80.0100.05322.19
7.0.70.0130.05022.05
7.0.60.0130.05022.01
7.0.50.0070.06022.16
7.0.40.0070.06022.06
7.0.30.0170.04722.05
7.0.20.0070.05722.06
7.0.10.0230.06321.98
7.0.00.0100.05722.05
5.6.280.0130.05721.09
5.6.270.0100.05320.98
5.6.260.0130.05720.88
5.6.250.0070.06320.91
5.6.240.0100.05720.88
5.6.230.0100.06020.75
5.6.220.0130.05020.93
5.6.210.0130.05020.86
5.6.200.0070.06020.75
5.6.190.0200.05721.04
5.6.180.0070.06320.84
5.6.170.0070.06020.95
5.6.160.0070.05720.95
5.6.150.0130.05321.02
5.6.140.0130.05321.01
5.6.130.0100.05320.85
5.6.120.0030.07020.87
5.6.110.0030.06321.03
5.6.100.0130.06720.93
5.6.90.0100.05321.02
5.6.80.0130.05020.38
5.6.70.0000.06020.16
5.6.60.0030.06020.32
5.6.50.0000.06020.45
5.6.40.0100.05320.31
5.6.30.0070.05720.20
5.6.20.0030.06020.21
5.6.10.0000.06020.36
5.6.00.0100.05020.39

preferences:
52.08 ms | 401 KiB | 5 Q