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"; 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.0000.01816.63
8.3.50.0050.01221.95
8.3.40.0070.00718.88
8.3.30.0040.01119.09
8.3.20.0040.00420.16
8.3.10.0040.00423.71
8.3.00.0080.00019.38
8.2.180.0130.00316.50
8.2.170.0090.00622.96
8.2.160.0100.00720.53
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0000.00726.16
8.2.120.0000.00722.25
8.2.110.0070.00319.31
8.2.100.0040.00817.79
8.2.90.0030.00619.34
8.2.80.0040.00417.97
8.2.70.0080.00017.46
8.2.60.0030.00618.05
8.2.50.0030.00518.07
8.2.40.0040.00419.94
8.2.30.0000.00718.06
8.2.20.0080.00017.64
8.2.10.0040.00418.01
8.2.00.0030.00717.76
8.1.280.0040.01125.92
8.1.270.0040.00423.76
8.1.260.0040.00426.35
8.1.250.0040.01428.09
8.1.240.0030.00721.44
8.1.230.0080.00417.52
8.1.220.0040.00417.77
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0080.00017.23
8.1.180.0000.01019.01
8.1.170.0000.00818.71
8.1.160.0070.00022.06
8.1.150.0000.00718.71
8.1.140.0040.00417.46
8.1.130.0000.00817.77
8.1.120.0000.00717.39
8.1.110.0000.00717.38
8.1.100.0040.00317.48
8.1.90.0070.00017.41
8.1.80.0040.00417.45
8.1.70.0000.00717.49
8.1.60.0040.00417.50
8.1.50.0060.00317.46
8.1.40.0040.00417.49
8.1.30.0040.00417.62
8.1.20.0040.00417.58
8.1.10.0000.00717.56
8.1.00.0000.00817.36
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0030.00318.42
8.0.270.0030.00317.18
8.0.260.0000.00717.32
8.0.250.0040.00416.91
8.0.240.0040.00416.81
8.0.230.0000.00716.98
8.0.220.0000.00716.93
8.0.210.0030.00316.91
8.0.200.0080.00016.96
8.0.190.0040.00416.99
8.0.180.0050.00316.77
8.0.170.0050.00316.81
8.0.160.0070.00016.82
8.0.150.0080.00016.76
8.0.140.0030.00516.86
8.0.130.0000.00713.30
8.0.120.0090.00016.77
8.0.110.0080.00016.85
8.0.100.0000.00716.95
8.0.90.0070.00016.95
8.0.80.0000.01516.96
8.0.70.0070.00016.80
8.0.60.0050.00316.95
8.0.50.0040.00316.92
8.0.30.0120.00617.19
8.0.20.0120.00817.40
8.0.10.0040.00416.89
8.0.00.0070.01116.77
7.4.330.0050.00015.07
7.4.320.0000.00616.42
7.4.300.0000.00616.50
7.4.290.0000.00716.44
7.4.280.0040.00416.41
7.4.270.0000.00716.50
7.4.260.0030.00316.40
7.4.250.0040.00416.61
7.4.240.0010.00616.50
7.4.230.0070.00016.55
7.4.220.0030.01416.64
7.4.210.0110.00616.58
7.4.200.0030.00316.34
7.4.190.0000.00716.63
7.4.160.0080.00816.43
7.4.150.0090.00917.40
7.4.140.0090.01217.86
7.4.130.0100.00716.56
7.4.120.0090.00916.55
7.4.110.0100.01316.54
7.4.100.0130.01116.38
7.4.90.0150.00616.40
7.4.80.0060.01519.39
7.4.70.0090.01216.46
7.4.60.0150.00716.63
7.4.50.0030.00616.57
7.4.40.0160.00316.29
7.4.30.0120.00916.62
7.4.10.0040.01114.70
7.4.00.0050.00814.99
7.3.330.0020.00413.02
7.3.320.0000.00512.98
7.3.310.0030.00316.36
7.3.300.0050.00216.21
7.3.290.0040.01516.24
7.3.280.0090.00916.30
7.3.270.0130.00617.40
7.3.260.0120.00616.34
7.3.250.0070.01016.29
7.3.240.0070.01016.63
7.3.230.0060.01116.39
7.3.210.0100.00716.43
7.3.200.0160.00619.39
7.3.190.0140.00816.40
7.3.180.0060.00916.39
7.3.170.0070.01316.41
7.3.160.0120.00316.59
7.3.130.0040.01014.55
7.3.120.0050.00714.83
7.3.110.0040.01114.84
7.3.100.0060.00615.09
7.3.90.0060.00615.05
7.3.80.0090.00314.98
7.3.70.0070.00714.75
7.3.60.0030.01315.00
7.3.50.0040.01115.07
7.3.40.0090.00314.94
7.3.30.0060.00314.85
7.3.20.0030.01216.79
7.3.10.0110.00316.53
7.3.00.0050.00516.66
7.2.330.0060.01616.87
7.2.320.0060.01316.40
7.2.310.0070.01016.67
7.2.300.0090.00916.66
7.2.290.0090.01216.67
7.2.260.0040.01115.04
7.2.250.0040.01114.84
7.2.240.0060.01015.08
7.2.230.0060.00914.83
7.2.220.0050.00514.71
7.2.210.0040.01114.93
7.2.200.0070.00314.97
7.2.190.0060.00915.13
7.2.180.0040.01114.85
7.2.170.0000.01215.17
7.2.160.0080.00314.99
7.2.150.0090.00616.67
7.2.140.0000.01516.97
7.2.130.0070.00716.77
7.2.120.0040.00716.93
7.2.110.0060.00917.07
7.2.100.0130.00316.73
7.2.90.0060.00616.76
7.2.80.0000.01416.95
7.2.70.0060.00616.95
7.2.60.0060.00616.92
7.2.50.0030.00717.00
7.2.40.0060.00916.95
7.2.30.0030.01216.84
7.2.20.0060.00316.94
7.2.10.0000.01516.75
7.2.00.0040.00718.17
7.1.330.0040.01115.86
7.1.320.0030.01015.55
7.1.310.0060.00315.92
7.1.300.0060.01015.77
7.1.290.0070.00715.81
7.1.280.0040.01115.82
7.1.270.0060.00615.97
7.1.260.0100.00316.04
7.1.250.0060.00615.80
7.1.240.0000.00815.51
7.1.230.0120.00315.60
7.1.220.0070.01115.96
7.1.210.0030.01015.89
7.1.200.0030.01015.62
7.1.190.0030.00915.95
7.1.180.0070.00315.76
7.1.170.0080.00315.77
7.1.160.0000.01315.91
7.1.150.0080.00515.63
7.1.140.0090.00615.77
7.1.130.0100.00715.82
7.1.120.0000.01515.60
7.1.110.0060.00615.76
7.1.100.0050.00817.06
7.1.90.0080.00616.01
7.1.80.0030.01015.65
7.1.70.0020.00616.38
7.1.60.0090.01017.64
7.1.50.0030.01216.37
7.1.40.0030.01015.71
7.1.30.0060.00915.83
7.1.20.0000.01315.93
7.1.10.0060.00615.70
7.1.00.0060.04018.95
7.0.330.0030.00915.58
7.0.320.0060.00315.61
7.0.310.0110.00415.10
7.0.300.0030.00815.25
7.0.290.0040.01115.36
7.0.280.0070.00715.25
7.0.270.0040.00815.42
7.0.260.0070.00715.53
7.0.250.0110.00315.68
7.0.240.0000.01215.17
7.0.230.0030.01315.32
7.0.220.0100.00315.26
7.0.210.0030.00615.45
7.0.200.0080.00814.97
7.0.190.0090.00315.29
7.0.180.0130.00015.40
7.0.170.0030.01315.59
7.0.160.0050.00515.57
7.0.150.0030.00915.42
7.0.140.0000.04218.73
7.0.130.0140.00015.59
7.0.120.0110.00415.41
7.0.110.0000.00815.32
7.0.100.0030.00715.55
7.0.90.0000.01215.33
7.0.80.0070.00715.40
7.0.70.0040.00415.53
7.0.60.0100.03417.67
7.0.50.0080.04016.63
7.0.40.0130.03616.75
7.0.30.0260.04016.66
7.0.20.0170.02316.82
7.0.10.0060.02416.74
7.0.00.0090.02116.77
5.6.400.0030.00614.56
5.6.390.0100.00314.73
5.6.380.0000.00914.59
5.6.370.0110.00414.46
5.6.360.0030.00614.46
5.6.350.0100.00714.38
5.6.340.0040.00814.38
5.6.330.0080.00414.62
5.6.320.0070.00714.59
5.6.310.0030.00914.48
5.6.300.0040.00414.55
5.6.290.0000.01014.57
5.6.280.0050.03917.78
5.6.270.0030.01214.49
5.6.260.0080.00014.30
5.6.250.0000.01014.54
5.6.240.0130.00314.40
5.6.230.0060.00914.41
5.6.220.0000.01014.37
5.6.210.0150.03717.38
5.6.200.0050.02316.27
5.6.190.0090.02217.42
5.6.180.2250.01817.46
5.6.170.0220.02217.39
5.6.160.0050.04017.30
5.6.150.0050.03916.23
5.6.140.0060.02416.29
5.6.130.0050.04416.36
5.6.120.0100.04217.81
5.6.110.0070.04217.84
5.6.100.0050.02517.61
5.6.90.0080.04017.63
5.6.80.0100.04317.49
5.6.70.0000.01314.14
5.6.60.0100.00314.46
5.6.50.0060.00314.45
5.6.40.0000.01214.38
5.6.30.0140.00414.04
5.6.20.0050.00914.47
5.6.10.0040.01114.38
5.6.00.0050.00514.58
5.5.380.0090.00014.36
5.5.370.0000.00814.32
5.5.360.0070.00714.26
5.5.350.0150.03517.35
5.5.340.0030.04616.04
5.5.330.0050.02317.30
5.5.320.0150.02517.32
5.5.310.0150.02917.46
5.5.300.0070.04716.07
5.5.290.0060.04616.03
5.5.280.0030.02817.77
5.5.270.0070.04417.46
5.5.260.0090.04717.48
5.5.250.0100.04317.39
5.5.240.0170.04217.21
5.5.230.0030.00914.29
5.5.220.0090.00314.09
5.5.210.0030.00614.40
5.5.200.0030.01014.44
5.5.190.0110.00714.13
5.5.180.0030.01414.17
5.5.170.0060.00314.27
5.5.160.0000.00914.38
5.5.150.0030.00614.36
5.5.140.0110.00414.47
5.5.130.0000.01714.51
5.5.120.0030.00913.98
5.5.110.0030.01014.27
5.5.100.0080.00514.09
5.5.90.0000.01014.18
5.5.80.0060.00814.29
5.5.70.0090.00614.28
5.5.60.0060.00314.16
5.5.50.0030.00814.41
5.5.40.0120.00614.25
5.5.30.0030.01014.33
5.5.20.0060.00913.93
5.5.10.0030.01014.20
5.5.00.0140.00014.47
5.4.450.0550.04315.37
5.4.440.0470.02715.40
5.4.430.0600.03215.26
5.4.420.0590.03515.43
5.4.410.0330.03215.31
5.4.400.0480.02715.27
5.4.390.0450.03515.09
5.4.380.0190.02914.96
5.4.370.0100.03514.89
5.4.360.0150.03115.03
5.4.350.0130.03514.93
5.4.340.0220.03214.89
5.4.330.0000.00711.27
5.4.320.0080.02211.87
5.4.310.0090.02611.87
5.4.300.0100.02611.87
5.4.290.0070.02311.86
5.4.280.0020.02411.81
5.4.270.0070.02011.81
5.4.260.0030.02611.81
5.4.250.0060.02311.81
5.4.240.0010.02711.81
5.4.230.0120.01711.80
5.4.220.0090.04211.80
5.4.210.0020.02511.80
5.4.200.0050.02711.80
5.4.190.0060.02311.80
5.4.180.0070.02211.80
5.4.170.0060.03511.80
5.4.160.0080.03511.80
5.4.150.0090.02311.80
5.4.140.0050.02811.64
5.4.130.0040.02811.64
5.4.120.0060.02411.62
5.4.110.0080.03011.61
5.4.100.0050.02511.62
5.4.90.0020.02411.62
5.4.80.0060.02811.61
5.4.70.0040.02811.61
5.4.60.0050.02011.61
5.4.50.0070.02011.62
5.4.40.0020.02511.61
5.4.30.0050.02311.61
5.4.20.0080.02411.61
5.4.10.0050.02811.61
5.4.00.0080.02111.35
5.3.290.0010.02612.04
5.3.280.0080.02411.99
5.3.270.0080.03112.00
5.3.260.0090.03911.99
5.3.250.0070.02812.00
5.3.240.0050.03211.99
5.3.230.0070.03211.99
5.3.220.0040.02411.98
5.3.210.0060.03311.97
5.3.200.0030.02811.97
5.3.190.0070.03111.97
5.3.180.0020.02911.97
5.3.170.0050.02111.97
5.3.160.0060.02111.97
5.3.150.0070.02111.97
5.3.140.0080.02711.96
5.3.130.0050.02811.96
5.3.120.0100.02511.96
5.3.110.0130.03011.96
5.3.100.0100.02511.69
5.3.90.0070.02911.68
5.3.80.0050.02711.67
5.3.70.0040.03111.67
5.3.60.0070.02011.67
5.3.50.0060.02111.63
5.3.40.0060.02311.63
5.3.30.0090.02011.61
5.3.20.0050.02411.51
5.3.10.0060.02811.48
5.3.00.0110.02711.48
5.2.170.0070.0569.19
5.2.160.0110.0419.18
5.2.150.0060.0429.19
5.2.140.0090.0329.18
5.2.130.0070.0339.14
5.2.120.0160.0529.14
5.2.110.0130.0609.15
5.2.100.0100.0369.15
5.2.90.0120.0439.15
5.2.80.0080.0589.14
5.2.70.0080.0609.14
5.2.60.0110.0559.10
5.2.50.0110.0719.07
5.2.40.0060.0439.04
5.2.30.0080.0609.02
5.2.20.0060.0419.01
5.2.10.0050.0318.93
5.2.00.0050.0398.79
5.1.60.0050.0248.08
5.1.50.0000.0298.07
5.1.40.0030.0268.05
5.1.30.0030.0288.41
5.1.20.0060.0258.42
5.1.10.0080.0288.15
5.1.00.0080.0398.15
5.0.50.0080.0416.63
5.0.40.0110.0306.49
5.0.30.0040.0436.29
5.0.20.0060.0196.27
5.0.10.0050.0266.25
5.0.00.0050.0406.24
4.4.90.0050.0214.78
4.4.80.0070.0264.75
4.4.70.0090.0324.75
4.4.60.0020.0164.75
4.4.50.0030.0154.77
4.4.40.0040.0264.71
4.4.30.0050.0154.76
4.4.20.0030.0184.84
4.4.10.0040.0204.85
4.4.00.0050.0274.76
4.3.110.0050.0224.66
4.3.100.0050.0184.66
4.3.90.0050.0194.63
4.3.80.0040.0304.59
4.3.70.0040.0204.63
4.3.60.0060.0184.63
4.3.50.0060.0204.63
4.3.40.0020.0324.54
4.3.30.0030.0273.29
4.3.20.0040.0383.27
4.3.10.0030.0243.23
4.3.00.0100.01310.55

preferences:
36.94 ms | 404 KiB | 6 Q