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; $is_arch = $bitmask & CF_ARCH; if ($is_god) { print "Godly "; } if ($is_arch) { print "Arch "; } 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.0100.00316.63
8.3.50.0080.01222.01
8.3.40.0090.00618.84
8.3.30.0090.00619.23
8.3.20.0000.00820.22
8.3.10.0050.00323.66
8.3.00.0060.00319.25
8.2.180.0100.00716.38
8.2.170.0110.00722.96
8.2.160.0140.00320.36
8.2.150.0040.00424.18
8.2.140.0000.01024.66
8.2.130.0040.00426.16
8.2.120.0060.00322.24
8.2.110.0030.00722.29
8.2.100.0040.00717.78
8.2.90.0080.00019.02
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0000.00817.93
8.2.50.0050.00518.07
8.2.40.0070.00320.07
8.2.30.0110.00018.12
8.2.20.0040.00417.78
8.2.10.0040.00418.07
8.2.00.0050.00217.77
8.1.280.0140.00325.92
8.1.270.0050.00323.96
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00322.13
8.1.230.0040.00717.52
8.1.220.0000.00717.74
8.1.210.0040.00418.77
8.1.200.0000.00817.38
8.1.190.0050.00317.10
8.1.180.0030.00719.00
8.1.170.0080.00018.41
8.1.160.0000.00721.95
8.1.150.0050.00218.66
8.1.140.0040.00417.58
8.1.130.0030.00317.72
8.1.120.0040.00417.50
8.1.110.0080.00017.32
8.1.100.0040.00417.40
8.1.90.0030.00517.52
8.1.80.0100.00017.44
8.1.70.0030.00317.46
8.1.60.0030.00617.59
8.1.50.0040.00417.49
8.1.40.0050.00317.57
8.1.30.0000.00817.69
8.1.20.0000.00717.63
8.1.10.0080.00017.56
8.1.00.0040.00417.50
8.0.300.0080.00018.77
8.0.290.0050.00216.75
8.0.280.0000.00718.52
8.0.270.0000.00717.26
8.0.260.0060.00017.33
8.0.250.0000.00816.86
8.0.240.0000.00716.96
8.0.230.0040.00416.89
8.0.220.0030.00316.95
8.0.210.0000.00716.92
8.0.200.0030.00916.85
8.0.190.0060.00316.96
8.0.180.0070.00016.96
8.0.170.0000.00816.93
8.0.160.0030.00617.02
8.0.150.0000.00716.89
8.0.140.0000.00816.93
8.0.130.0060.00013.43
8.0.120.0000.00816.76
8.0.110.0050.00216.83
8.0.100.0040.00416.73
8.0.90.0000.00716.88
8.0.80.0060.00916.86
8.0.70.0040.00416.96
8.0.60.0040.00416.80
8.0.50.0000.00716.90
8.0.30.0130.00916.98
8.0.20.0070.01117.40
8.0.10.0000.00817.02
8.0.00.0090.01016.83
7.4.330.0060.00015.16
7.4.320.0040.00416.56
7.4.300.0030.00316.50
7.4.290.0070.00016.61
7.4.280.0050.00316.50
7.4.270.0040.00416.64
7.4.260.0020.00516.50
7.4.250.0040.00416.41
7.4.240.0070.00016.58
7.4.230.0000.00716.32
7.4.220.0060.01216.52
7.4.210.0090.01016.47
7.4.200.0000.00716.59
7.4.190.0000.00716.59
7.4.160.0030.01316.40
7.4.150.0090.01317.40
7.4.140.0060.01217.86
7.4.130.0110.00716.46
7.4.120.0130.00816.54
7.4.110.0140.00316.45
7.4.100.0140.00616.43
7.4.90.0100.00716.46
7.4.80.0130.01019.39
7.4.70.0050.01116.28
7.4.60.0050.01816.55
7.4.50.0030.00516.35
7.4.40.0120.00916.70
7.4.30.0110.00716.79
7.4.00.0100.00714.89
7.3.330.0060.00013.18
7.3.320.0050.00013.15
7.3.310.0000.00716.12
7.3.300.0030.00316.27
7.3.290.0090.00616.32
7.3.280.0090.00816.28
7.3.270.0130.00317.40
7.3.260.0150.00616.45
7.3.250.0100.00816.49
7.3.240.0120.00616.61
7.3.230.0140.00316.41
7.3.210.0090.00916.52
7.3.200.0130.00919.39
7.3.190.0030.01616.24
7.3.180.0030.01316.57
7.3.170.0120.00316.41
7.3.160.0090.00616.45
7.3.120.0060.00914.80
7.2.330.0120.00616.39
7.2.320.0060.01216.48
7.2.310.0120.00616.43
7.2.300.0170.00016.86
7.2.290.0080.00916.55
7.2.80.0030.01016.59
7.2.60.0060.00616.66
7.1.200.0060.00615.56
7.1.100.0000.01218.30
7.1.70.0000.01417.06
7.1.60.0100.01419.46
7.1.50.0100.01317.05
7.1.00.0100.06722.43
7.0.200.0110.00814.48
7.0.140.0030.07322.13
7.0.110.0130.03720.05
7.0.100.0100.04720.03
7.0.90.0130.03720.09
7.0.80.0170.03719.96
7.0.70.0230.03719.91
7.0.60.0100.04019.68
7.0.50.0170.04019.88
7.0.40.0000.04319.74
7.0.30.0000.04319.86
7.0.20.0030.04019.66
7.0.10.0070.03719.75
7.0.00.0000.04019.82
5.6.280.0000.07720.90
5.6.260.0030.05020.74
5.6.250.0070.04320.69
5.6.240.0030.04020.70
5.6.230.0070.04720.56
5.6.220.0000.04320.54
5.6.210.0000.04320.68
5.6.200.0030.04020.68
5.6.190.0030.04020.48
5.6.180.0000.04320.71
5.6.170.0100.04320.61
5.6.160.0070.05720.62
5.6.150.0000.04320.62
5.6.140.0070.04020.55
5.6.130.0100.07020.56
5.6.120.0100.03320.59
5.6.110.0030.07320.65
5.6.100.0030.09020.69
5.6.90.0030.07720.57
5.6.80.0030.06719.94
5.6.70.0130.07320.02
5.6.60.0070.04019.97
5.6.50.0030.07719.97
5.6.40.0070.03719.96
5.6.30.0130.06319.93
5.6.20.0070.03719.95
5.6.10.0030.07720.01
5.6.00.0070.04019.95
5.5.380.0100.04317.62
5.5.370.0030.04017.63
5.5.360.0030.04017.47
5.5.350.0070.04017.20
5.5.340.0000.04018.16
5.5.330.0100.04717.85
5.5.320.0130.03318.14
5.5.310.0030.04017.86
5.5.300.0130.03018.16
5.5.290.0070.04018.16
5.5.280.0070.04018.13
5.5.270.0030.05018.08
5.5.260.0230.06018.09
5.5.250.0100.06317.94
5.5.240.0070.05017.39
5.5.230.0000.04017.54
5.5.220.0100.06017.50
5.5.210.0100.03717.63
5.5.200.0100.06717.21
5.5.190.0070.04717.21
5.5.180.0100.06017.60
5.5.160.0000.07017.47
5.5.150.0100.06017.60
5.5.140.0030.03717.33
5.5.130.0100.07017.35
5.5.120.0070.03317.24
5.5.110.0070.05017.52
5.5.100.0000.04717.12
5.5.90.0070.04717.41
5.5.80.0030.03717.35
5.5.70.0070.03017.40
5.5.60.0070.07717.25
5.5.50.0070.07317.26
5.5.40.0100.06717.39
5.5.30.0100.07716.96
5.5.20.0030.03717.37
5.5.10.0030.07717.00
5.5.00.0030.03717.36
5.4.450.0030.06019.50
5.4.440.0100.06019.44
5.4.430.0100.07719.35
5.4.420.0000.04019.34
5.4.410.0070.06019.23
5.4.400.0070.07018.93
5.4.390.0030.08719.27
5.4.380.0070.05718.94
5.4.370.0070.03718.95
5.4.360.0100.07318.95
5.4.350.0070.07018.93
5.4.340.0070.07318.97
5.4.320.0070.05019.10
5.4.310.0100.03018.95
5.4.300.0170.02319.03
5.4.290.0000.04019.00
5.4.280.0070.06019.19
5.4.270.0130.07019.11
5.4.260.0030.07319.07
5.4.250.0030.07319.16
5.4.240.0130.05718.99
5.4.230.0030.07019.09
5.4.220.0100.07318.92
5.4.210.0100.06319.02
5.4.200.0030.04019.24
5.4.190.0070.07319.11
5.4.180.0030.06019.26
5.4.170.0070.07319.00
5.4.160.0070.06019.00
5.4.150.0130.03019.10
5.4.140.0070.06716.52
5.4.130.0030.07316.54
5.4.120.0100.03716.58
5.4.110.0000.04016.29
5.4.100.0100.06716.43
5.4.90.0070.04316.24
5.4.80.0030.07016.53
5.4.70.0070.06716.57
5.4.60.0100.04716.46
5.4.50.0170.03316.25
5.4.40.0100.03716.40
5.4.30.0000.04316.45
5.4.20.0000.04716.38
5.4.10.0070.04016.35
5.4.00.0000.07715.70
5.3.290.0100.05014.69
5.3.280.0100.07014.60
5.3.270.0070.06714.49
5.3.260.0000.07714.67
5.3.250.0070.08014.55
5.3.240.0130.06314.44
5.3.230.0100.07314.43
5.3.220.0100.02714.50
5.3.210.0100.04714.57
5.3.200.0070.04714.50
5.3.190.0000.07014.64
5.3.180.0170.02314.66
5.3.170.0030.07014.56
5.3.160.0030.07014.63
5.3.150.0030.07014.48
5.3.140.0030.05014.38
5.3.130.0100.06714.57
5.3.120.0030.07314.45
5.3.110.0030.04714.43
5.3.100.0030.07313.91
5.3.90.0100.06314.02
5.3.80.0030.06713.95
5.3.70.0130.03714.04
5.3.60.0070.05313.90
5.3.50.0000.06014.04
5.3.40.0000.04013.89
5.3.30.0130.06313.84
5.3.20.0000.08013.52
5.3.10.0000.04313.73
5.3.00.0130.06713.52
5.2.170.0070.05012.07
5.2.160.0000.06312.07
5.2.150.0070.05012.07
5.2.140.0000.04712.07
5.2.130.0030.05712.07
5.2.120.0030.03712.07
5.2.110.0070.02712.07
5.2.100.0100.06012.07
5.2.90.0030.06012.07
5.2.80.0030.04312.07
5.2.70.0030.03712.07
5.2.60.0170.04012.07
5.2.50.0100.04312.07
5.2.40.0070.02712.07
5.2.30.0030.06012.07
5.2.20.0030.03712.07
5.2.10.0070.04012.07
5.2.00.0100.05012.07
5.1.60.0130.04312.07
5.1.50.0000.04312.07
5.1.40.0030.05012.07
5.1.30.0030.05712.07
5.1.20.0030.04012.07
5.1.10.0070.05012.07
5.1.00.0070.05312.07
5.0.50.0070.04012.07
5.0.40.0000.04712.07
5.0.30.0030.04712.07
5.0.20.0100.03712.07
5.0.10.0030.02312.07
5.0.00.0000.07012.07
4.4.90.0070.01712.07
4.4.80.0030.02312.07
4.4.70.0030.02312.07
4.4.60.0000.03312.07
4.4.50.0000.03312.07
4.4.40.0000.05012.07
4.4.30.0030.02012.07
4.4.20.0100.03012.07
4.4.10.0000.03712.07
4.4.00.0000.05712.07
4.3.110.0070.03012.07
4.3.100.0030.03012.07
4.3.90.0000.02312.07
4.3.80.0000.04012.07
4.3.70.0000.02012.07
4.3.60.0100.02312.07
4.3.50.0030.03312.07
4.3.40.0030.05312.07
4.3.30.0000.02012.07
4.3.20.0000.03312.07
4.3.10.0000.02712.07
4.3.00.0000.02712.07

preferences:
88.67 ms | 401 KiB | 5 Q