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 "$CF_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.0150.00316.88
8.3.50.0110.00621.83
8.3.40.0120.00918.98
8.3.30.0100.00319.12
8.3.20.0000.00720.34
8.3.10.0080.00023.63
8.3.00.0070.00419.26
8.2.180.0070.00718.06
8.2.170.0110.00422.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0100.00024.66
8.2.130.0100.00326.16
8.2.120.0000.00822.22
8.2.110.0060.00922.25
8.2.100.0040.00817.89
8.2.90.0000.00719.25
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0060.00317.93
8.2.50.0030.00618.07
8.2.40.0080.00019.95
8.2.30.0070.00418.14
8.2.20.0000.00817.81
8.2.10.0040.00418.19
8.2.00.0060.00317.75
8.1.280.0180.00625.92
8.1.270.0040.00423.64
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00423.95
8.1.230.0060.00619.00
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0080.00017.12
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0000.00818.67
8.1.160.0000.00722.04
8.1.150.0000.00818.66
8.1.140.0030.00517.51
8.1.130.0000.00717.86
8.1.120.0030.00317.47
8.1.110.0000.00817.36
8.1.100.0040.00417.47
8.1.90.0000.00717.37
8.1.80.0030.00617.37
8.1.70.0050.00217.45
8.1.60.0000.00917.65
8.1.50.0080.00017.55
8.1.40.0030.00517.57
8.1.30.0000.00817.63
8.1.20.0070.00017.68
8.1.10.0040.00417.56
8.1.00.0000.00717.38
8.0.300.0000.00720.62
8.0.290.0000.00717.18
8.0.280.0030.00318.48
8.0.270.0030.00317.29
8.0.260.0000.00617.21
8.0.250.0000.00717.00
8.0.240.0000.00817.04
8.0.230.0030.00316.91
8.0.220.0030.00316.90
8.0.210.0000.00716.87
8.0.200.0040.00717.02
8.0.190.0040.00417.01
8.0.180.0000.00816.90
8.0.170.0060.00316.96
8.0.160.0040.00416.86
8.0.150.0000.00816.75
8.0.140.0070.00016.89
8.0.130.0000.00613.44
8.0.120.0000.00916.94
8.0.110.0050.00216.86
8.0.100.0050.00317.03
8.0.90.0040.00417.01
8.0.80.0000.01517.03
8.0.70.0000.00716.86
8.0.60.0040.00416.84
8.0.50.0000.00816.83
8.0.30.0110.01117.20
8.0.20.0060.01117.40
8.0.10.0000.00817.16
8.0.00.0120.00816.72
7.4.330.0000.00515.14
7.4.320.0000.00816.61
7.4.300.0000.00616.46
7.4.290.0040.00416.46
7.4.280.0060.00316.51
7.4.270.0000.00716.60
7.4.260.0000.00716.61
7.4.250.0030.00716.62
7.4.240.0000.00716.49
7.4.230.0030.00316.33
7.4.220.0110.01416.55
7.4.210.0100.00916.53
7.4.200.0000.00716.71
7.4.190.0030.00316.76
7.4.160.0120.00316.56
7.4.150.0070.01017.40
7.4.140.0100.00617.86
7.4.130.0100.00916.64
7.4.120.0080.01116.68
7.4.110.0080.00916.60
7.4.100.0070.01416.36
7.4.90.0170.00416.52
7.4.80.0180.00419.39
7.4.70.0040.01216.78
7.4.60.0050.01116.48
7.4.50.0000.00716.68
7.4.40.0150.00916.42
7.4.30.0040.01216.61
7.4.10.0040.01415.10
7.4.00.0020.01414.86
7.3.330.0030.00313.08
7.3.320.0000.00513.25
7.3.310.0000.00716.32
7.3.300.0030.00316.34
7.3.290.0120.00316.36
7.3.280.0090.01016.35
7.3.270.0100.01017.40
7.3.260.0060.01216.43
7.3.250.0050.01216.43
7.3.240.0090.00616.34
7.3.230.0140.00316.39
7.3.210.0120.00616.36
7.3.200.0090.00919.39
7.3.190.0100.00716.54
7.3.180.0070.01016.32
7.3.170.0090.00616.42
7.3.160.0030.01216.61
7.3.130.0000.01914.73
7.3.120.0080.00815.12
7.3.110.0000.01914.89
7.3.100.0060.00615.00
7.3.90.0100.00714.89
7.3.80.0070.00314.79
7.3.70.0060.00314.81
7.3.60.0040.01114.87
7.3.50.0030.01015.01
7.3.40.0040.01414.78
7.3.30.0040.00814.89
7.3.20.0060.00916.82
7.3.10.0060.00916.52
7.3.00.0040.01116.66
7.2.330.0110.00716.53
7.2.320.0170.00016.65
7.2.310.0100.01316.71
7.2.300.0100.00616.72
7.2.290.0100.00716.69
7.2.260.0060.01215.20
7.2.250.0090.00915.27
7.2.240.0060.00615.16
7.2.230.0000.01515.23
7.2.220.0100.00014.93
7.2.210.0040.01114.80
7.2.200.0060.00614.84
7.2.190.0110.00715.07
7.2.180.0120.00415.11
7.2.170.0070.01015.06
7.2.160.0030.01014.72
7.2.150.0110.00416.93
7.2.140.0030.01216.75
7.2.130.0050.00516.84
7.2.120.0030.00616.50
7.2.110.0060.00916.77
7.2.100.0110.00316.99
7.2.90.0070.00717.12
7.2.80.0100.00616.67
7.2.70.0070.00316.97
7.2.60.0190.00716.52
7.2.50.0070.01017.01
7.2.40.0070.01116.91
7.2.30.0000.01716.82
7.2.20.0060.01216.77
7.2.10.0070.01116.64
7.2.00.0100.00317.82
7.1.330.0070.01015.77
7.1.320.0030.00615.58
7.1.310.0060.00315.71
7.1.300.0060.00615.69
7.1.290.0040.01115.84
7.1.280.0060.00615.89
7.1.270.0040.00815.63
7.1.260.0090.00615.73
7.1.250.0110.00416.00
7.1.240.0000.01115.90
7.1.230.0060.00315.85
7.1.220.0030.01015.73
7.1.210.0050.01015.71
7.1.200.0030.00915.67
7.1.190.0100.00015.63
7.1.180.0070.01015.50
7.1.170.0130.00015.73
7.1.160.0100.00315.72
7.1.150.0030.01015.98
7.1.140.0090.00915.88
7.1.130.0090.00915.94
7.1.120.0100.00315.59
7.1.110.0070.00715.83
7.1.100.0050.00916.97
7.1.90.0090.00915.86
7.1.80.0120.00615.90
7.1.70.0020.00916.67
7.1.60.0050.00717.65
7.1.50.0020.01116.34
7.1.40.0060.00315.51
7.1.30.0090.00615.75
7.1.20.0080.00415.86
7.1.10.0080.00815.74
7.1.00.0030.04419.15
7.0.330.0000.01215.51
7.0.320.0000.01515.41
7.0.310.0080.00315.57
7.0.300.0030.01215.14
7.0.290.0080.00415.48
7.0.280.0000.01115.57
7.0.270.0030.01315.49
7.0.260.0040.00415.57
7.0.250.0100.00315.21
7.0.240.0040.00815.64
7.0.230.0090.00615.62
7.0.220.0070.00715.37
7.0.210.0000.00815.49
7.0.200.0190.00515.04
7.0.190.0070.00715.46
7.0.180.0000.01115.45
7.0.170.0030.01015.31
7.0.160.0110.00415.55
7.0.150.0030.00615.57
7.0.140.0030.04218.79
7.0.130.0070.00715.64
7.0.120.0000.01615.54
7.0.110.0000.01415.37
7.0.100.0070.00715.56
7.0.90.0040.01115.44
7.0.80.0040.01215.50
7.0.70.0040.00815.47
7.0.60.0080.03017.83
7.0.50.0140.03716.70
7.0.40.0040.02616.71
7.0.30.0070.03116.85
7.0.20.0180.02416.80
7.0.10.0110.04316.87
7.0.00.0020.03216.79
5.6.400.0060.00914.68
5.6.390.0040.00814.17
5.6.380.0060.00314.36
5.6.370.0070.00714.64
5.6.360.0090.00614.45
5.6.350.0060.00914.36
5.6.340.0060.00614.69
5.6.330.0000.01714.58
5.6.320.0070.01014.41
5.6.310.0040.01114.45
5.6.300.0060.00914.25
5.6.290.0030.00714.20
5.6.280.0050.04017.70
5.6.270.0040.01114.46
5.6.260.0060.00614.71
5.6.250.0030.01014.46
5.6.240.0000.01314.27
5.6.230.0090.00914.39
5.6.220.0090.00014.29
5.6.210.0120.02817.56
5.6.200.0080.04716.12
5.6.190.0050.04717.63
5.6.180.0110.02317.48
5.6.170.0130.04517.46
5.6.160.0050.04417.59
5.6.150.0080.04216.32
5.6.140.0000.03316.28
5.6.130.0070.03216.27
5.6.120.0060.02717.74
5.6.110.0100.02717.59
5.6.100.0120.04517.72
5.6.90.0080.03517.64
5.6.80.0090.02717.44
5.6.70.0030.00914.18
5.6.60.0040.01214.47
5.6.50.0040.01214.25
5.6.40.0000.01614.59
5.6.30.0070.00414.33
5.6.20.0000.01414.41
5.6.10.0030.00614.22
5.6.00.0060.00614.32
5.5.380.0070.00714.51
5.5.370.0090.00614.13
5.5.360.0030.01014.43
5.5.350.0170.03817.38
5.5.340.0020.02816.11
5.5.330.0100.02317.20
5.5.320.0080.02217.32
5.5.310.0220.02217.26
5.5.300.0020.04116.13
5.5.290.0060.02516.14
5.5.280.0070.04817.56
5.5.270.0050.02617.67
5.5.260.0100.03017.66
5.5.250.0090.04417.34
5.5.240.0060.01817.00
5.5.230.0040.01114.32
5.5.220.0110.00414.16
5.5.210.0040.00714.32
5.5.200.0000.01514.37
5.5.190.0030.00914.06
5.5.180.0100.01014.37
5.5.170.0030.01014.39
5.5.160.0090.00614.25
5.5.150.0060.00914.32
5.5.140.0030.01014.36
5.5.130.0000.01014.48
5.5.120.0050.00514.43
5.5.110.0070.00714.30
5.5.100.0000.01014.04
5.5.90.0000.01714.43
5.5.80.0130.00014.53
5.5.70.0000.01714.33
5.5.60.0100.00014.17
5.5.50.0070.01014.37
5.5.40.0030.01014.09
5.5.30.0070.00314.47
5.5.20.0070.00314.38
5.5.10.0090.00013.99
5.5.00.0030.01313.94
5.4.450.0520.03015.24
5.4.440.0430.03415.41
5.4.430.0420.02515.44
5.4.420.0510.02515.16
5.4.410.0560.03015.04
5.4.400.0660.03115.00
5.4.390.0520.03215.09
5.4.380.0150.03214.83
5.4.370.0180.02514.74
5.4.360.0100.03314.88
5.4.350.0160.03314.74
5.4.340.0160.02714.75
5.4.330.0060.00310.95
5.4.320.0080.01811.75
5.4.310.0070.03111.69
5.4.300.0050.02411.72
5.4.290.0060.02611.74
5.4.280.0090.02411.63
5.4.270.0060.02411.63
5.4.260.0060.03211.65
5.4.250.0090.02911.64
5.4.240.0070.03011.63
5.4.230.0090.03011.63
5.4.220.0060.02911.63
5.4.210.0040.03211.63
5.4.200.0040.02711.63
5.4.190.0090.02111.66
5.4.180.0060.02811.63
5.4.170.0070.03011.63
5.4.160.0050.03111.72
5.4.150.0080.02511.62
5.4.140.0040.02711.49
5.4.130.0070.02011.46
5.4.120.0040.02511.44
5.4.110.0080.02211.44
5.4.100.0040.02411.44
5.4.90.0060.02911.44
5.4.80.0050.03511.46
5.4.70.0070.02011.43
5.4.60.0090.02311.44
5.4.50.0040.03011.50
5.4.40.0040.02611.54
5.4.30.0080.02011.47
5.4.20.0060.02411.43
5.4.10.0060.01811.43
5.4.00.0070.01911.21
5.3.290.0060.02711.86
5.3.280.0090.02711.81
5.3.270.0100.02511.82
5.3.260.0040.03411.82
5.3.250.0070.02211.82
5.3.240.0050.02211.82
5.3.230.0080.02011.81
5.3.220.0040.02311.80
5.3.210.0050.02111.80
5.3.200.0060.02111.80
5.3.190.0040.02911.80
5.3.180.0040.02311.79
5.3.170.0020.02811.79
5.3.160.0050.02411.79
5.3.150.0070.01911.79
5.3.140.0060.02011.79
5.3.130.0090.02011.79
5.3.120.0060.02311.78
5.3.110.0060.02211.78
5.3.100.0040.02911.52
5.3.90.0030.02211.50
5.3.80.0050.02111.49
5.3.70.0070.03311.50
5.3.60.0060.02711.49
5.3.50.0070.02711.46
5.3.40.0040.02911.46
5.3.30.0070.02511.43
5.3.20.0050.02911.32
5.3.10.0040.02911.31
5.3.00.0060.02411.30
5.2.170.0080.0419.18
5.2.160.0040.0309.19
5.2.150.0070.0379.19
5.2.140.0070.0289.18
5.2.130.0060.0309.14
5.2.120.0080.0269.14
5.2.110.0040.0309.15
5.2.100.0060.0299.15
5.2.90.0060.0309.14
5.2.80.0030.0309.14
5.2.70.0030.0329.14
5.2.60.0050.0339.09
5.2.50.0030.0449.06
5.2.40.0060.0319.04
5.2.30.0050.0369.02
5.2.20.0040.0299.00
5.2.10.0060.0268.93
5.2.00.0070.0318.79
5.1.60.0040.0248.07
5.1.50.0050.0248.07
5.1.40.0020.0288.05
5.1.30.0050.0388.41
5.1.20.0060.0378.42
5.1.10.0080.0278.15
5.1.00.0040.0388.15
5.0.50.0050.0276.63
5.0.40.0040.0186.48
5.0.30.0040.0426.29
5.0.20.0060.0246.27
5.0.10.0020.0216.25
5.0.00.0030.0316.24
4.4.90.0020.0164.77
4.4.80.0050.0154.75
4.4.70.0040.0174.75
4.4.60.0050.0194.75
4.4.50.0040.0204.77
4.4.40.0020.0294.71
4.4.30.0030.0194.76
4.4.20.0020.0234.85
4.4.10.0020.0184.84
4.4.00.0060.0254.75
4.3.110.0020.0174.67
4.3.100.0050.0184.67
4.3.90.0030.0174.64
4.3.80.0050.0254.58
4.3.70.0020.0174.63
4.3.60.0040.0144.63
4.3.50.0020.0164.63
4.3.40.0020.0264.54
4.3.30.0030.0213.29
4.3.20.0040.0203.27
4.3.10.0010.0233.22
4.3.00.0300.01310.55

preferences:
39.82 ms | 401 KiB | 5 Q