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 = $bitmask & CF_GOD; print "$class_name\n"; if ($is_god) { print "This player is god\n"; }

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.0110.00716.75
8.3.50.0060.01022.00
8.3.40.0110.00418.67
8.3.30.0030.01019.13
8.3.20.0080.00020.21
8.3.10.0050.00323.48
8.3.00.0070.00319.25
8.2.180.0080.00818.54
8.2.170.0120.00622.96
8.2.160.0090.00620.30
8.2.150.0000.00824.18
8.2.140.0000.00924.66
8.2.130.0030.01426.16
8.2.120.0080.00022.22
8.2.110.0160.00622.01
8.2.100.0060.00617.72
8.2.90.0040.00419.19
8.2.80.0090.00017.97
8.2.70.0040.00417.63
8.2.60.0040.00418.05
8.2.50.0000.00818.07
8.2.40.0000.00819.88
8.2.30.0030.00520.05
8.2.20.0080.00017.62
8.2.10.0080.00018.08
8.2.00.0000.01017.76
8.1.280.0130.00325.92
8.1.270.0060.00323.97
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0050.00523.83
8.1.230.0040.00819.11
8.1.220.0080.00017.79
8.1.210.0000.00918.77
8.1.200.0030.00617.23
8.1.190.0000.00817.00
8.1.180.0030.00618.10
8.1.170.0050.00318.74
8.1.160.0040.00421.99
8.1.150.0040.00418.56
8.1.140.0050.00317.39
8.1.130.0050.00317.84
8.1.120.0000.00717.51
8.1.110.0040.00417.37
8.1.100.0040.00417.36
8.1.90.0030.00517.36
8.1.80.0100.00017.44
8.1.70.0000.00817.42
8.1.60.0000.00817.63
8.1.50.0080.00017.55
8.1.40.0040.00417.42
8.1.30.0050.00317.63
8.1.20.0050.00317.69
8.1.10.0000.00917.57
8.1.00.0000.00817.54
8.0.300.0030.00620.81
8.0.290.0000.00717.05
8.0.280.0030.00318.38
8.0.270.0030.00317.18
8.0.260.0030.00317.32
8.0.250.0070.00016.86
8.0.240.0000.00717.02
8.0.230.0000.00716.93
8.0.220.0030.00316.95
8.0.210.0000.00616.84
8.0.200.0040.00416.84
8.0.190.0000.00916.98
8.0.180.0070.00016.95
8.0.170.0040.00416.95
8.0.160.0000.00716.90
8.0.150.0030.00316.87
8.0.140.0040.00416.92
8.0.130.0080.00013.34
8.0.120.0040.00416.98
8.0.110.0030.00616.80
8.0.100.0030.00516.81
8.0.90.0000.00716.75
8.0.80.0090.01216.92
8.0.70.0000.00816.93
8.0.60.0040.00417.02
8.0.50.0070.00016.93
8.0.30.0130.00617.04
8.0.20.0080.01117.40
8.0.10.0070.00016.91
8.0.00.0100.00716.97
7.4.330.0050.00015.00
7.4.320.0040.00416.45
7.4.300.0040.00416.61
7.4.290.0030.00316.63
7.4.280.0000.00816.47
7.4.270.0040.00416.43
7.4.260.0030.00316.59
7.4.250.0000.00716.43
7.4.240.0020.00516.49
7.4.230.0000.00716.50
7.4.220.0030.02016.73
7.4.210.0080.00816.66
7.4.200.0040.00416.64
7.4.190.0040.00416.68
7.4.160.0040.01916.40
7.4.150.0140.00317.40
7.4.140.0130.00517.86
7.4.130.0060.01316.56
7.4.120.0120.00616.50
7.4.110.0130.00316.48
7.4.100.0130.01016.42
7.4.90.0090.00916.52
7.4.80.0070.01319.39
7.4.70.0070.01416.61
7.4.60.0100.00716.12
7.4.50.0000.00916.40
7.4.40.0120.00616.16
7.4.30.0060.00916.32
7.4.00.0080.00814.86
7.3.330.0000.00613.18
7.3.320.0050.00013.20
7.3.310.0070.00016.11
7.3.300.0070.00016.30
7.3.290.0030.01016.34
7.3.280.0090.00816.29
7.3.270.0090.01217.40
7.3.260.0110.00616.59
7.3.250.0090.01016.36
7.3.240.0030.01516.44
7.3.230.0080.01116.60
7.3.210.0090.00616.37
7.3.200.0030.00619.39
7.3.190.0090.01316.51
7.3.180.0030.01216.46
7.3.170.0110.01116.34
7.3.160.0000.01516.37
7.3.120.0070.00915.04
7.3.110.0000.01414.79
7.3.100.0060.00914.94
7.3.90.0070.00714.64
7.3.80.0070.00715.16
7.3.70.0060.00314.49
7.3.60.0070.00714.50
7.3.50.0000.01214.62
7.3.40.0080.00814.89
7.3.30.0040.00414.92
7.3.20.0110.00716.50
7.3.10.0030.01316.67
7.3.00.0070.00616.54
7.2.330.0200.00316.73
7.2.320.0050.01516.75
7.2.310.0040.01816.75
7.2.300.0090.00616.70
7.2.290.0070.01016.68
7.2.250.0040.01515.09
7.2.240.0110.01115.04
7.2.230.0030.01214.98
7.2.220.0120.00315.02
7.2.210.0030.00915.00
7.2.200.0100.00314.59
7.2.190.0030.00615.17
7.2.180.0040.01114.70
7.2.170.0000.01815.02
7.2.130.0030.01016.61
7.2.120.0060.00916.79
7.2.110.0070.00716.95
7.2.100.0030.01017.02
7.2.90.0060.00916.84
7.2.80.0030.01016.72
7.2.70.0110.00416.86
7.2.60.0080.00616.52
7.2.50.0100.00716.72
7.2.40.0100.00316.95
7.2.30.0090.00616.94
7.2.20.0040.01116.95
7.2.10.0000.01816.83
7.2.00.0050.00918.06
7.1.330.0070.00715.98
7.1.320.0030.01115.96
7.1.310.0110.00415.95
7.1.300.0120.00415.89
7.1.290.0070.01015.83
7.1.280.0070.01015.84
7.1.270.0070.00415.75
7.1.260.0100.00715.52
7.1.250.0070.00715.81
7.1.200.0060.00315.85
7.1.100.0060.00918.20
7.1.70.0030.00517.35
7.1.60.0000.02119.46
7.1.50.0030.01316.93
7.1.00.0130.06722.46
7.0.200.0300.00714.70
7.0.140.0070.07022.04
7.0.60.0070.08019.94
7.0.50.0030.08717.88
7.0.40.0100.07019.90
7.0.30.0400.06720.31
7.0.20.0330.06720.02
7.0.10.0000.05020.20
7.0.00.0070.04320.17
5.6.280.0070.07021.09
5.6.210.0100.06320.63
5.6.200.0070.04018.13
5.6.190.0070.05720.79
5.6.180.0230.05320.43
5.6.170.0130.04320.44
5.6.160.0100.08020.44
5.6.150.0030.05318.15
5.6.140.0070.08318.14
5.6.130.0070.05718.14
5.6.120.0070.07721.00
5.6.110.0130.07321.02
5.6.100.0070.04020.99
5.6.90.0200.07020.98
5.6.80.0000.04320.36
5.5.350.0030.04720.33
5.5.340.0030.08318.02
5.5.330.0070.07720.40
5.5.320.3070.04720.32
5.5.310.0270.05320.24
5.5.300.0130.03018.02
5.5.290.0100.05317.96
5.5.280.0030.08720.88
5.5.270.0100.07720.95
5.5.260.0170.05020.96
5.5.250.0100.04720.57
5.5.240.0030.07720.16
5.4.450.0870.08319.57
5.4.440.0830.06319.26
5.4.430.0900.04319.53
5.4.420.0670.05719.43
5.4.410.0530.06319.00
5.4.400.0830.05718.99
5.4.390.0930.06719.30
5.4.380.0370.05318.61
5.4.370.0430.04718.56
5.4.360.0330.04718.74
5.4.350.0600.04018.67
5.4.340.0330.05718.58
5.4.320.0040.04312.47
5.4.310.0050.04312.46
5.4.300.0080.04712.46
5.4.290.0060.04012.45
5.4.280.0110.05012.35
5.4.270.0120.06512.34
5.4.260.0100.07312.34
5.4.250.0200.08612.34
5.4.240.0060.04512.34
5.4.230.0150.05812.34
5.4.220.0390.09312.34
5.4.210.0100.04712.34
5.4.200.0080.04212.34
5.4.190.0060.05012.34
5.4.180.0080.05512.33
5.4.170.0090.05312.35
5.4.160.0090.03612.34
5.4.150.0060.03912.34
5.4.140.0080.03712.02
5.4.130.0090.03512.01
5.4.120.0080.03611.96
5.4.110.0100.04611.96
5.4.100.0070.03811.96
5.4.90.0070.03911.96
5.4.80.0080.03811.96
5.4.70.0040.04211.96
5.4.60.0110.04211.96
5.4.50.0110.03911.95
5.4.40.0070.03611.94
5.4.30.0050.03811.94
5.4.20.0060.03711.95
5.4.10.0120.04611.94
5.4.00.0080.06411.43
5.3.290.0090.04012.80
5.3.280.0200.07712.71
5.3.270.0080.11412.72
5.3.260.0060.04112.72
5.3.250.0060.04312.72
5.3.240.0090.04612.71
5.3.230.0090.04812.71
5.3.220.0070.04512.68
5.3.210.0060.05112.68
5.3.200.0080.05412.68
5.3.190.0090.05012.68
5.3.180.0120.05012.68
5.3.170.0090.05212.66
5.3.160.0110.05912.67
5.3.150.0130.04912.67
5.3.140.0110.06712.66
5.3.130.0090.05712.66
5.3.120.0120.05212.65
5.3.110.0090.06112.66
5.3.100.0130.04812.12
5.3.90.0120.05112.09
5.3.80.0090.05412.07
5.3.70.0080.04312.07
5.3.60.0050.03912.07
5.3.50.0090.03712.00
5.3.40.0100.03712.00
5.3.30.0090.03611.95
5.3.20.0070.04211.73
5.3.10.0060.03711.70
5.3.00.0110.04911.68
5.2.170.0040.0349.19
5.2.160.0080.0319.19
5.2.150.0080.0299.18
5.2.140.0080.0309.18
5.2.130.0060.0379.14
5.2.120.0060.0329.14
5.2.110.0060.0439.15
5.2.100.0050.0459.14
5.2.90.0110.0409.15
5.2.80.0100.0399.14
5.2.70.0070.0429.14
5.2.60.0090.0509.10
5.2.50.0060.0379.07
5.2.40.0090.0319.05
5.2.30.0080.0469.02
5.2.20.0120.0389.01
5.2.10.0090.0398.93
5.2.00.0060.0388.79
5.1.60.0030.0348.07
5.1.50.0060.0238.07
5.1.40.0030.0278.05
5.1.30.0110.0298.40
5.1.20.0070.0368.42
5.1.10.0070.0368.14
5.1.00.0060.0428.15
5.0.50.0070.0286.63
5.0.40.0110.0256.48
5.0.30.0070.0446.30
5.0.20.0060.0306.27
5.0.10.0060.0346.25
5.0.00.0100.0526.24
4.4.90.0050.0244.78
4.4.80.0040.0244.75
4.4.70.0050.0214.75
4.4.60.0040.0194.75
4.4.50.0070.0234.77
4.4.40.0070.0384.71
4.4.30.0050.0254.76
4.4.20.0040.0244.85
4.4.10.0040.0224.85
4.4.00.0030.0344.76
4.3.110.0070.0224.67
4.3.100.0050.0204.66
4.3.90.0060.0194.63
4.3.80.0050.0314.58
4.3.70.0040.0224.63
4.3.60.0020.0234.63
4.3.50.0020.0184.63
4.3.40.0040.0244.53
4.3.30.0020.0173.29
4.3.20.0020.0203.27
4.3.10.0010.0223.22
4.3.00.0100.02010.55

preferences:
38.05 ms | 401 KiB | 5 Q