3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('WARRIOR_OFFSET', 16); define('MAGE_OFFSET', 17); define('CLASS_MASK', ( 1 << WARRIOR_OFFSET ) | ( 1 << MAGE_OFFSET )); define('CF_GOD', 1 << 2); // may issue #god commands define('CF_PLAYER', 1 << 3); // is a player define('CF_STAFF', 1 << 4); // member of the staff define('CF_INVISIBLE', 1 << 5); // character is completely invisible define('CF_GENDER', 1 << 14 | 1 << 15); // Determine Gender define('CF_ARCH', 1 << 18); // is arch-XXX define('CF_LQMASTER', 1 << 52); // may host LQs define('CF_NOWHO', 1 << 56); // invisible to /who define('CF_WON', 1 << 57); // character won the game (ie killed islena $bitmask = 475149; $classMap = array( 0b00 => 'error', 0b01 => 'warrior', 0b10 => 'mage', 0b11 => 'seyan', ); $class = $bitmask & CLASS_MASK; $class = $class >> WARRIOR_OFFSET; $class_name = $classMap[$class]; $is_god = (bool) $bitmask & CF_GOD; print "$class_name\n"; print "$is_god";

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.01116.63
8.3.50.0110.00822.10
8.3.40.0140.00718.88
8.3.30.0120.00319.04
8.3.20.0000.00720.34
8.3.10.0040.00423.65
8.3.00.0000.00819.25
8.2.180.0130.00318.29
8.2.170.0090.00922.96
8.2.160.0040.01120.35
8.2.150.0080.00024.18
8.2.140.0040.00724.66
8.2.130.0090.00026.16
8.2.120.0050.00222.27
8.2.110.0060.00322.20
8.2.100.0030.00917.91
8.2.90.0080.00019.21
8.2.80.0040.00417.97
8.2.70.0100.00017.49
8.2.60.0080.00019.65
8.2.50.0040.00418.07
8.2.40.0030.00520.01
8.2.30.0000.00718.12
8.2.20.0000.00817.67
8.2.10.0000.00718.20
8.2.00.0050.00617.63
8.1.280.0120.00625.92
8.1.270.0000.00823.67
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.83
8.1.230.0000.01219.04
8.1.220.0030.00617.79
8.1.210.0030.00618.77
8.1.200.0080.00017.35
8.1.190.0030.00617.25
8.1.180.0030.00719.01
8.1.170.0030.00618.59
8.1.160.0030.00522.06
8.1.150.0040.00418.65
8.1.140.0040.00417.38
8.1.130.0040.00417.89
8.1.120.0040.00417.39
8.1.110.0020.00517.52
8.1.100.0080.00017.50
8.1.90.0000.00817.36
8.1.80.0000.00817.48
8.1.70.0070.00017.43
8.1.60.0000.00917.50
8.1.50.0060.00317.52
8.1.40.0070.00017.57
8.1.30.0040.00417.61
8.1.20.0000.00717.68
8.1.10.0070.00017.59
8.1.00.0070.00017.52
8.0.300.0070.00020.73
8.0.290.0040.00417.18
8.0.280.0030.00718.40
8.0.270.0040.00417.32
8.0.260.0030.00317.24
8.0.250.0050.00316.87
8.0.240.0000.00716.84
8.0.230.0000.00816.96
8.0.220.0030.00316.97
8.0.210.0030.00316.96
8.0.200.0030.00616.96
8.0.190.0030.00516.86
8.0.180.0040.00416.92
8.0.170.0040.00416.95
8.0.160.0070.00016.89
8.0.150.0040.00416.86
8.0.140.0040.00416.78
8.0.130.0070.00013.42
8.0.120.0030.00516.89
8.0.110.0040.00416.89
8.0.100.0020.00516.93
8.0.90.0000.00816.76
8.0.80.0060.00916.96
8.0.70.0040.00316.79
8.0.60.0000.00716.90
8.0.50.0050.00317.02
8.0.30.0110.00717.21
8.0.20.0160.00317.40
8.0.10.0070.00016.97
8.0.00.0070.01016.64
7.4.330.0050.00015.12
7.4.320.0050.00216.54
7.4.300.0030.00316.46
7.4.290.0070.00016.54
7.4.280.0000.00816.62
7.4.270.0070.00016.62
7.4.260.0000.00716.64
7.4.250.0000.00816.38
7.4.240.0050.00216.58
7.4.230.0030.00316.64
7.4.220.0060.01216.46
7.4.210.0100.00716.57
7.4.200.0000.00716.49
7.4.190.0000.00716.61
7.4.160.0060.00916.46
7.4.150.0100.00717.40
7.4.140.0140.00717.86
7.4.130.0160.00216.66
7.4.120.0080.00916.47
7.4.110.0070.01016.43
7.4.100.0070.01416.44
7.4.90.0070.01016.56
7.4.80.0090.01419.39
7.4.70.0080.00816.74
7.4.60.0060.01516.41
7.4.50.0030.00616.44
7.4.40.0100.01016.50
7.4.30.0060.01116.50
7.4.00.0050.01215.11
7.3.330.0030.00313.12
7.3.320.0000.00513.15
7.3.310.0000.00716.46
7.3.300.0000.00716.19
7.3.290.0030.01616.33
7.3.280.0090.00816.27
7.3.270.0100.01017.40
7.3.260.0100.00716.25
7.3.250.0110.01016.53
7.3.240.0030.01316.56
7.3.230.0120.00716.39
7.3.210.0100.00616.46
7.3.200.0070.01119.39
7.3.190.0150.00316.28
7.3.180.0090.00616.58
7.3.170.0090.00616.47
7.3.160.0000.01516.43
7.3.120.0080.00814.95
7.3.110.0060.01214.99
7.3.100.0000.01414.68
7.3.90.0060.00914.66
7.3.80.0110.00414.61
7.3.70.0030.00914.96
7.3.60.0030.01014.95
7.3.50.0080.00614.64
7.3.40.0090.00614.85
7.3.30.0100.00314.74
7.3.20.0100.00316.71
7.3.10.0060.00816.79
7.3.00.0000.01316.82
7.2.330.0090.00916.73
7.2.320.0120.00616.79
7.2.310.0120.00916.40
7.2.300.0060.01016.66
7.2.290.0060.01316.75
7.2.250.0100.00715.06
7.2.240.0130.00315.05
7.2.230.0040.01115.29
7.2.220.0030.01314.93
7.2.210.0060.00915.10
7.2.200.0040.00715.10
7.2.190.0070.00414.66
7.2.180.0040.01415.20
7.2.170.0090.00615.03
7.2.00.0000.01119.44
7.1.330.0070.00715.84
7.1.320.0060.00915.53
7.1.310.0060.00815.95
7.1.300.0040.01115.76
7.1.290.0030.00915.83
7.1.280.0030.01215.91
7.1.270.0060.00615.95
7.1.260.0040.00415.51
7.1.100.0030.00917.75
7.1.70.0030.00917.17
7.1.60.0070.01719.46
7.1.50.0090.01217.02
7.1.00.0100.07022.54
7.0.200.0240.00715.02
7.0.140.0030.09022.09
7.0.60.0100.08319.93
7.0.50.0030.04317.84
7.0.40.0000.08319.98
7.0.30.0130.05020.18
7.0.20.0300.08320.12
7.0.10.0100.03720.09
7.0.00.0100.08320.19
5.6.280.0000.07721.10
5.6.210.0170.07020.50
5.6.200.0130.06718.16
5.6.190.0100.04320.41
5.6.180.4100.04320.49
5.6.170.0230.04720.38
5.6.160.0070.08020.44
5.6.150.0030.06718.22
5.6.140.0100.08018.16
5.6.130.0070.07718.16
5.6.120.0070.05020.88
5.6.110.0170.07720.89
5.6.100.0170.07720.99
5.6.90.0100.07321.08
5.6.80.0130.07720.48
5.5.350.0170.03020.53
5.5.340.0000.08017.92
5.5.330.0230.06720.15
5.5.320.0400.07720.32
5.5.310.0300.07020.27
5.5.300.0170.07017.96
5.5.290.0070.08017.99
5.5.280.0100.09020.78
5.5.270.0030.09720.64
5.5.260.0030.05020.73
5.5.250.0000.06320.58
5.5.240.0070.07020.17
5.4.450.0800.06019.51
5.4.440.0930.06019.48
5.4.430.0770.05019.31
5.4.420.0570.06319.23
5.4.410.0700.05719.36
5.4.400.0800.05018.78
5.4.390.0770.05018.91
5.4.380.0270.05018.62
5.4.370.0270.06718.74
5.4.360.0430.04318.68
5.4.350.0330.06318.59
5.4.340.0370.05018.72
5.4.320.0060.04112.47
5.4.310.0060.04112.46
5.4.300.0060.04312.47
5.4.290.0140.08112.45
5.4.280.0090.04212.35
5.4.270.0090.05212.34
5.4.260.0090.04812.35
5.4.250.0100.05112.34
5.4.240.0060.04112.35
5.4.230.0090.05412.34
5.4.220.0060.06112.34
5.4.210.0060.05312.34
5.4.200.0090.05912.34
5.4.190.0100.04412.34
5.4.180.0030.06912.33
5.4.170.0140.07212.34
5.4.160.0090.06012.34
5.4.150.0070.05112.33
5.4.140.0050.05612.02
5.4.130.0060.04812.00
5.4.120.0070.05611.96
5.4.110.0070.04911.96
5.4.100.0110.04411.96
5.4.90.0130.04611.96
5.4.80.0080.04511.96
5.4.70.0160.07011.96
5.4.60.0190.06411.96
5.4.50.0160.07611.96
5.4.40.0140.08511.95
5.4.30.0150.07911.94
5.4.20.0130.06811.94
5.4.10.0140.05211.95
5.4.00.0050.05411.43
5.3.290.0140.03312.80
5.3.280.0080.04812.71
5.3.270.0100.05112.72
5.3.260.0200.08912.72
5.3.250.0140.04512.72
5.3.240.0190.09412.72
5.3.230.0170.07012.71
5.3.220.0100.04612.68
5.3.210.0090.06012.68
5.3.200.0050.07912.68
5.3.190.0090.07912.68
5.3.180.0180.09612.67
5.3.170.0120.06312.67
5.3.160.0060.05912.67
5.3.150.0070.05412.67
5.3.140.0090.04112.66
5.3.130.0090.04612.65
5.3.120.0080.04312.66
5.3.110.0080.04812.66
5.3.100.0060.04512.12
5.3.90.0110.03912.08
5.3.80.0060.04412.07
5.3.70.0040.04212.07
5.3.60.0050.03812.07
5.3.50.0070.03912.00
5.3.40.0060.04312.00
5.3.30.0100.04211.95
5.3.20.0070.05711.73
5.3.10.0070.05111.70
5.3.00.0100.07311.69
5.2.170.0120.0619.19
5.2.160.0060.0399.19
5.2.150.0200.0679.19
5.2.140.0090.0349.18
5.2.130.0070.0499.14
5.2.120.0110.0359.14
5.2.110.0060.0369.15
5.2.100.0130.0629.14
5.2.90.0180.0529.15
5.2.80.0100.0489.14
5.2.70.0140.0699.14
5.2.60.0050.0439.09
5.2.50.0170.0569.07
5.2.40.0140.0549.04
5.2.30.0080.0409.02
5.2.20.0050.0389.01
5.2.10.0070.0278.93
5.2.00.0060.0358.79
5.1.60.0030.0268.08
5.1.50.0050.0258.07
5.1.40.0040.0258.05
5.1.30.0030.0288.40
5.1.20.0050.0278.42
5.1.10.0040.0368.14
5.1.00.0020.0278.15
5.0.50.0030.0266.63
5.0.40.0070.0266.49
5.0.30.0060.0346.29
5.0.20.0030.0256.27
5.0.10.0080.0246.25
5.0.00.0060.0326.24
4.4.90.0050.0214.78
4.4.80.0030.0194.76
4.4.70.0030.0174.76
4.4.60.0040.0164.76
4.4.50.0030.0174.77
4.4.40.0070.0264.71
4.4.30.0070.0254.76
4.4.20.0050.0204.84
4.4.10.0060.0214.85
4.4.00.0020.0284.76
4.3.110.0010.0204.66
4.3.100.0040.0404.66
4.3.90.0020.0164.63
4.3.80.0060.0244.59
4.3.70.0030.0174.63
4.3.60.0030.0224.62
4.3.50.0080.0154.62
4.3.40.0020.0274.54
4.3.30.0020.0173.29
4.3.20.0020.0223.27
4.3.10.0050.0173.23
4.3.00.0300.03310.55

preferences:
43.81 ms | 401 KiB | 5 Q