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; if ($is_god) { print "Godly"; } print "$class_name\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.0070.01016.75
8.3.50.0120.00522.05
8.3.40.0120.00618.90
8.3.30.0090.00619.07
8.3.20.0000.00720.19
8.3.10.0080.00023.56
8.3.00.0040.00419.38
8.2.180.0150.00018.29
8.2.170.0120.00922.96
8.2.160.0030.01020.52
8.2.150.0050.00324.18
8.2.140.0120.00324.66
8.2.130.0040.01126.16
8.2.120.0060.00322.05
8.2.110.0060.00322.04
8.2.100.0060.00617.66
8.2.90.0100.00018.97
8.2.80.0000.00817.97
8.2.70.0070.00317.75
8.2.60.0040.00417.90
8.2.50.0080.00018.07
8.2.40.0060.00319.88
8.2.30.0040.00419.78
8.2.20.0000.00817.77
8.2.10.0070.00018.20
8.2.00.0030.00617.82
8.1.280.0130.00625.92
8.1.270.0060.00323.77
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00623.84
8.1.230.0090.00319.04
8.1.220.0030.00517.78
8.1.210.0060.00318.77
8.1.200.0090.00017.36
8.1.190.0040.00417.00
8.1.180.0000.01019.01
8.1.170.0040.00418.46
8.1.160.0040.00421.95
8.1.150.0070.00018.58
8.1.140.0070.00017.47
8.1.130.0030.00317.90
8.1.120.0040.00317.48
8.1.110.0040.00417.36
8.1.100.0000.00817.43
8.1.90.0040.00417.51
8.1.80.0000.00817.45
8.1.70.0070.00017.40
8.1.60.0070.00017.62
8.1.50.0030.00617.43
8.1.40.0040.00417.52
8.1.30.0000.00817.63
8.1.20.0040.00417.70
8.1.10.0000.00717.63
8.1.00.0040.00417.45
8.0.300.0040.00418.77
8.0.290.0040.00417.16
8.0.280.0070.00018.39
8.0.270.0000.00717.18
8.0.260.0000.00617.28
8.0.250.0000.00816.98
8.0.240.0030.00316.98
8.0.230.0080.00016.91
8.0.220.0070.00016.91
8.0.210.0000.00916.80
8.0.200.0030.00616.98
8.0.190.0000.00816.86
8.0.180.0070.00017.00
8.0.170.0080.00016.84
8.0.160.0040.00416.85
8.0.150.0000.00716.76
8.0.140.0000.00716.87
8.0.130.0030.00313.27
8.0.120.0080.00016.77
8.0.110.0070.00016.81
8.0.100.0000.00716.89
8.0.90.0040.00416.71
8.0.80.0110.00716.91
8.0.70.0040.00416.95
8.0.60.0040.00416.82
8.0.50.0050.00316.76
8.0.30.0110.01117.10
8.0.20.0090.00917.40
8.0.10.0060.00316.92
8.0.00.0100.00716.65
7.4.330.0030.00315.09
7.4.320.0000.00716.48
7.4.300.0030.00316.60
7.4.290.0000.00716.59
7.4.280.0040.00416.55
7.4.270.0000.00716.42
7.4.260.0060.00016.52
7.4.250.0030.00516.48
7.4.240.0010.00616.60
7.4.230.0000.00616.61
7.4.220.0140.00416.46
7.4.210.0070.00816.64
7.4.200.0070.00016.51
7.4.190.0030.00316.66
7.4.160.0070.00716.35
7.4.150.0120.00617.40
7.4.140.0100.00917.86
7.4.130.0110.00816.50
7.4.120.0120.00516.55
7.4.110.0030.01316.43
7.4.100.0110.01116.53
7.4.90.0150.00316.62
7.4.80.0160.00619.39
7.4.70.0080.00816.55
7.4.60.0070.01316.43
7.4.50.0060.00316.40
7.4.40.0060.01316.36
7.4.30.0000.01616.45
7.4.00.0070.01014.99
7.3.330.0030.00313.18
7.3.320.0000.00513.12
7.3.310.0070.00016.24
7.3.300.0040.00416.19
7.3.290.0000.01516.24
7.3.280.0090.00816.29
7.3.270.0140.00317.40
7.3.260.0090.00916.69
7.3.250.0120.00516.32
7.3.240.0090.00616.31
7.3.230.0080.01016.55
7.3.210.0150.00416.64
7.3.200.0090.01319.39
7.3.190.0070.01416.39
7.3.180.0030.01216.36
7.3.170.0170.00716.45
7.3.160.0090.01216.75
7.3.120.0070.00614.91
7.3.110.0030.01314.90
7.3.100.0060.00914.83
7.3.90.0130.00314.86
7.3.80.0030.00914.75
7.3.70.0080.00815.02
7.3.60.0030.00914.57
7.3.50.0000.01014.89
7.3.40.0040.01114.92
7.3.30.0000.01314.96
7.3.20.0060.00616.68
7.3.10.0090.00316.73
7.3.00.0070.00716.72
7.2.330.0070.01116.48
7.2.320.0130.00716.62
7.2.310.0130.01016.80
7.2.300.0040.01216.63
7.2.290.0120.00616.63
7.2.250.0090.00915.05
7.2.240.0030.01414.92
7.2.230.0150.00014.96
7.2.220.0080.01114.94
7.2.210.0040.01114.92
7.2.200.0000.01315.13
7.2.190.0000.01214.90
7.2.180.0080.00314.98
7.2.170.0080.00314.92
7.2.00.0060.00619.57
7.1.330.0090.00615.96
7.1.320.0070.01015.78
7.1.310.0040.01115.58
7.1.300.0070.00415.64
7.1.290.0000.01215.89
7.1.280.0030.01015.75
7.1.270.0080.00315.80
7.1.260.0080.00415.81
7.1.100.0000.01118.29
7.1.70.0130.00316.90
7.1.60.0090.01219.46
7.1.50.0130.01016.94
7.1.00.0100.06722.44
7.0.200.0130.00314.48
7.0.140.0000.07321.91
7.0.60.0200.07320.09
7.0.50.0000.05017.90
7.0.40.0070.04320.04
7.0.30.0230.08320.20
7.0.20.0300.07320.02
7.0.10.0100.07320.16
7.0.00.0030.06720.01
5.6.280.0130.06720.82
5.6.210.0170.07020.75
5.6.200.0030.04718.13
5.6.190.0030.04320.57
5.6.180.0300.04320.67
5.6.170.0330.06720.54
5.6.160.0030.04320.71
5.6.150.0070.08318.16
5.6.140.0000.05318.13
5.6.130.0100.05318.11
5.6.120.0070.06321.02
5.6.110.0070.08721.11
5.6.100.0100.07321.01
5.6.90.0170.07321.02
5.6.80.0030.03720.41
5.5.350.4100.04020.39
5.5.340.0130.06718.00
5.5.330.0130.06320.25
5.5.320.3630.04320.50
5.5.310.0230.05720.20
5.5.300.0100.07718.00
5.5.290.0030.04317.98
5.5.280.0030.04020.80
5.5.270.0070.07720.96
5.5.260.0030.08020.90
5.5.250.0100.04320.62
5.5.240.0030.07720.14
5.4.450.0470.05719.48
5.4.440.0870.06019.32
5.4.430.0100.07719.61
5.4.420.0070.06019.25
5.4.410.0100.05719.31
5.4.400.0100.05319.38
5.4.390.0130.05018.98
5.4.380.0270.05318.71
5.4.370.0330.05318.75
5.4.360.0400.04018.48
5.4.350.0400.05318.75
5.4.340.0300.05718.64
5.4.320.0050.05112.46
5.4.310.0080.05012.46
5.4.300.0100.03912.47
5.4.290.0140.05712.45
5.4.280.0110.05512.35
5.4.270.0080.05712.35
5.4.260.0060.05712.35
5.4.250.0120.05012.35
5.4.240.0190.08112.34
5.4.230.0060.05712.34
5.4.220.0100.06512.34
5.4.210.0130.07112.34
5.4.200.0090.05712.34
5.4.190.0100.04212.34
5.4.180.0100.04012.34
5.4.170.0060.04412.35
5.4.160.0140.07312.34
5.4.150.0100.03712.34
5.4.140.0060.03912.02
5.4.130.0080.03412.01
5.4.120.0090.04211.96
5.4.110.0210.07111.96
5.4.100.0240.08611.96
5.4.90.0210.09911.97
5.4.80.0190.08111.96
5.4.70.0160.08011.96
5.4.60.0170.08311.96
5.4.50.0200.05711.95
5.4.40.0130.06711.95
5.4.30.0170.06511.94
5.4.20.0130.05511.94
5.4.10.0170.10211.94
5.4.00.0130.05611.43
5.3.290.0090.04312.80
5.3.280.0090.07912.70
5.3.270.0140.05712.73
5.3.260.0230.09112.72
5.3.250.0140.08712.72
5.3.240.0130.08712.72
5.3.230.0200.08912.71
5.3.220.0120.05812.68
5.3.210.0130.04012.68
5.3.200.0080.05512.68
5.3.190.0100.05712.68
5.3.180.0170.07812.67
5.3.170.0130.05712.67
5.3.160.0070.05212.67
5.3.150.0120.04612.68
5.3.140.0100.07512.66
5.3.130.0080.05112.66
5.3.120.0380.12412.66
5.3.110.0130.07112.66
5.3.100.0140.07412.11
5.3.90.0180.10012.09
5.3.80.0070.04212.08
5.3.70.0170.04312.07
5.3.60.0050.04512.06
5.3.50.0070.04512.00
5.3.40.0170.04012.00
5.3.30.0080.03911.95
5.3.20.0090.05711.73
5.3.10.0100.06411.70
5.3.00.0140.08211.69
5.2.170.0210.0829.19
5.2.160.0170.0789.18
5.2.150.0060.0649.19
5.2.140.0170.0689.18
5.2.130.0040.0469.14
5.2.120.0080.0459.14
5.2.110.0100.0709.15
5.2.100.0070.0739.14
5.2.90.0090.0649.14
5.2.80.0100.0689.14
5.2.70.0090.0519.14
5.2.60.0070.0449.09
5.2.50.0270.1189.06
5.2.40.0170.0669.04
5.2.30.0070.0469.02
5.2.20.0100.0469.00
5.2.10.0040.0528.93
5.2.00.0140.0728.79
5.1.60.0180.0528.07
5.1.50.0090.0318.07
5.1.40.0100.1018.05
5.1.30.0090.0428.40
5.1.20.0090.0418.43
5.1.10.0110.0508.15
5.1.00.0100.0388.15
5.0.50.0080.0306.63
5.0.40.0080.0326.49
5.0.30.0100.0636.30
5.0.20.0080.0356.27
5.0.10.0130.0286.25
5.0.00.0030.0466.24
4.4.90.0050.0264.78
4.4.80.0050.0294.75
4.4.70.0070.0194.75
4.4.60.0050.0264.76
4.4.50.0090.0244.77
4.4.40.0030.0394.71
4.4.30.0010.0254.76
4.4.20.0050.0214.84
4.4.10.0060.0234.85
4.4.00.0020.0404.76
4.3.110.0050.0234.67
4.3.100.0050.0224.66
4.3.90.0030.0254.63
4.3.80.0040.0344.58
4.3.70.0030.0234.63
4.3.60.0020.0254.63
4.3.50.0030.0304.63
4.3.40.0040.0394.54
4.3.30.0040.0243.29
4.3.20.0050.0333.27
4.3.10.0060.0443.22
4.3.00.0100.0238.23

preferences:
38.14 ms | 401 KiB | 5 Q