3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected static $masks = array( 'default' => 'somemask', 'other' => 'different mask' ); public function method($maskName = 'default') { if (array_key_exists($maskName, self::$masks)) { print self::$masks[$maskName]; } else { print 'not found'; } } } $a = new A(); $a->method('other');

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.00718.30
8.3.50.0080.00922.06
8.3.40.0140.00018.85
8.3.30.0030.01019.09
8.3.20.0040.00420.29
8.3.10.0030.00521.89
8.3.00.0030.00622.58
8.2.180.0160.00616.63
8.2.170.0100.00322.96
8.2.160.0140.00022.08
8.2.150.0090.00624.18
8.2.140.0030.00524.66
8.2.130.0000.00826.16
8.2.120.0030.00519.48
8.2.110.0090.00022.12
8.2.100.0100.00319.57
8.2.90.0000.00819.25
8.2.80.0000.00917.97
8.2.70.0040.00417.75
8.2.60.0000.00818.05
8.2.50.0050.00318.07
8.2.40.0030.00618.22
8.2.30.0030.00618.00
8.2.20.0080.00017.59
8.2.10.0000.00819.48
8.2.00.0080.00017.55
8.1.280.0070.00725.92
8.1.270.0040.00422.19
8.1.260.0140.00326.35
8.1.250.0000.00728.09
8.1.240.0050.00323.97
8.1.230.0070.00318.97
8.1.220.0040.00417.78
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.29
8.1.180.0000.00818.10
8.1.170.0000.00818.39
8.1.160.0000.00722.01
8.1.150.0000.00918.51
8.1.140.0040.00417.39
8.1.130.0030.00517.83
8.1.120.0040.00417.44
8.1.110.0020.00517.30
8.1.100.0030.00317.36
8.1.90.0050.00317.37
8.1.80.0070.00017.45
8.1.70.0070.00017.35
8.1.60.0000.00817.59
8.1.50.0050.00317.46
8.1.40.0000.00817.53
8.1.30.0040.00417.63
8.1.20.0040.00417.62
8.1.10.0000.00717.60
8.1.00.0000.00817.52
8.0.300.0000.00718.77
8.0.290.0020.00517.17
8.0.280.0030.00318.35
8.0.270.0000.00717.29
8.0.260.0000.00616.72
8.0.250.0000.00716.94
8.0.240.0000.00716.97
8.0.230.0040.00416.82
8.0.220.0050.00216.80
8.0.210.0070.00016.84
8.0.200.0060.00316.90
8.0.190.0000.00816.88
8.0.180.0070.00016.74
8.0.170.0050.00216.73
8.0.160.0000.00916.81
8.0.150.0000.00716.64
8.0.140.0000.00716.61
8.0.130.0040.00413.23
8.0.120.0040.00416.74
8.0.110.0000.00816.71
8.0.100.0000.00716.82
8.0.90.0040.00416.93
8.0.80.0070.01416.85
8.0.70.0040.00416.67
8.0.60.0000.00816.70
8.0.50.0080.00016.61
8.0.30.0110.00917.06
8.0.20.0110.00817.40
8.0.10.0070.00016.90
8.0.00.0110.00816.71
7.4.330.0030.00315.09
7.4.320.0030.00316.52
7.4.300.0030.00316.57
7.4.290.0030.00316.45
7.4.280.0060.00016.39
7.4.270.0000.00716.50
7.4.260.0040.00216.47
7.4.250.0050.00316.48
7.4.240.0030.00316.55
7.4.230.0070.00016.49
7.4.220.0090.00916.36
7.4.210.0070.01016.52
7.4.200.0000.00716.30
7.4.190.0020.00516.76
7.4.160.0030.01316.54
7.4.150.0140.00317.40
7.4.140.0120.00617.86
7.4.130.0070.01016.49
7.4.120.0140.00516.41
7.4.110.0000.01616.42
7.4.100.0030.01516.68
7.4.90.0120.00616.41
7.4.80.0120.00619.39
7.4.70.0110.00716.34
7.4.60.0100.00716.45
7.4.50.0000.00916.30
7.4.40.0090.00622.77
7.4.30.0030.01316.42
7.4.00.0100.00614.69
7.3.330.0030.00213.36
7.3.320.0030.00313.30
7.3.310.0030.00316.42
7.3.300.0030.00316.25
7.3.290.0090.01016.29
7.3.280.0090.00616.27
7.3.270.0120.00617.40
7.3.260.0090.01616.39
7.3.250.0100.00716.45
7.3.240.0130.00316.26
7.3.230.0070.01016.39
7.3.210.0170.00016.41
7.3.200.0070.01019.39
7.3.190.0060.01116.59
7.3.180.0130.00316.39
7.3.170.0190.00016.63
7.3.160.0000.01516.57
7.3.120.0090.00614.78
7.3.10.0060.00616.52
7.3.00.0080.00816.29
7.2.330.0270.00016.73
7.2.320.0110.00716.59
7.2.310.0130.00316.74
7.2.300.0130.00316.30
7.2.290.0060.01016.63
7.2.130.0110.00316.77
7.2.120.0080.00616.84
7.2.110.0080.00316.76
7.2.100.0070.00716.89
7.2.90.0070.01017.05
7.2.80.0060.00916.86
7.2.70.0120.00317.14
7.2.60.0050.00716.83
7.2.50.0090.00617.04
7.2.40.0030.01016.83
7.2.30.0060.00316.75
7.2.20.0000.01516.58
7.2.10.0090.00317.08
7.2.00.0020.01018.17
7.1.250.0150.00015.59
7.1.200.0060.00615.90
7.1.100.0040.01117.70
7.1.70.0040.00417.09
7.1.60.0140.00016.89
7.1.50.0060.00617.00
7.1.00.0070.07022.43
7.0.200.0080.00416.59
7.0.140.0070.06722.00
7.0.60.0070.07319.78
7.0.50.0100.08317.86
7.0.40.0170.07720.12
7.0.30.0300.07720.07
7.0.20.0330.07320.26
7.0.10.0370.07020.15
7.0.00.0170.05020.33
5.6.280.0000.07721.07
5.6.210.0130.06320.75
5.6.200.0070.04318.14
5.6.190.0000.05020.39
5.6.180.0300.04020.66
5.6.170.0300.05720.58
5.6.160.0070.05320.43
5.6.150.0100.05018.28
5.6.140.0000.07718.28
5.6.130.0130.03018.17
5.6.120.0030.04021.05
5.6.110.0030.04321.04
5.6.100.0100.04720.91
5.6.90.0130.07720.98
5.6.80.0100.06320.41
5.6.70.0330.07020.36
5.5.350.0170.03720.50
5.5.340.0000.04318.07
5.5.330.0070.08020.27
5.5.320.0270.08020.31
5.5.310.0170.08320.32
5.5.300.0070.07017.96
5.5.290.0070.06717.92
5.5.280.0000.04720.87
5.5.270.0100.08320.76
5.5.260.0030.05720.68
5.5.250.0070.04720.59
5.5.240.0070.08320.06
5.4.450.0370.04719.34
5.4.440.0270.04719.48
5.4.430.0800.05319.51
5.4.420.0670.05719.22
5.4.410.0070.05718.97
5.4.400.0830.00018.79
5.4.390.0800.00018.84
5.4.380.0300.05018.79
5.4.370.0330.05018.72
5.4.360.0070.06018.72
5.4.350.0170.06018.79
5.4.340.0270.06018.79
5.4.320.0030.04512.50
5.4.310.0040.03912.50
5.4.300.0040.03812.50
5.4.290.0060.04812.50
5.4.280.0020.03912.39
5.4.270.0070.05318.79
5.4.260.0200.04318.99
5.4.250.0170.05318.96
5.4.240.0130.07318.89
5.4.230.0130.05318.73
5.4.220.0030.06318.96
5.4.210.0200.06718.94
5.4.200.0170.07018.74
5.4.190.0100.05018.99
5.4.180.0130.06718.93
5.4.170.0230.04018.96
5.4.160.0170.06318.97
5.4.150.0070.08318.77
5.4.140.0070.05316.56
5.4.130.0170.06016.47
5.4.120.0070.07016.38
5.4.110.0170.06716.32
5.4.100.0030.07016.51
5.4.90.0130.06716.39
5.4.80.0130.06316.37
5.4.70.0030.05316.34
5.4.60.0100.08016.52
5.4.50.0070.05716.43
5.4.40.0030.06016.41
5.4.30.0100.06016.46
5.4.20.0070.05016.50
5.4.10.0100.06716.49
5.4.00.0030.05315.87
5.3.290.0050.04012.80
5.3.280.0100.05714.68
5.3.270.0170.06314.67
5.3.260.0130.06314.71
5.3.250.0070.05314.59
5.3.240.0130.04714.67
5.3.230.0130.05714.59
5.3.220.0030.06314.66
5.3.210.0100.05314.49
5.3.200.0070.06014.66
5.3.190.0130.07714.64
5.3.180.0100.06314.55
5.3.170.0030.06014.58
5.3.160.0170.06714.65
5.3.150.0030.07714.74
5.3.140.0100.05014.52
5.3.130.0200.06714.47
5.3.120.0130.06314.45
5.3.110.0100.06014.68
5.3.100.0070.08313.94
5.3.90.0070.05314.15
5.3.80.0030.07313.98
5.3.70.0100.04713.86
5.3.60.0030.07714.17
5.3.50.0100.06714.03
5.3.40.0030.05713.78
5.3.30.0070.07713.74
5.3.20.0130.06713.68
5.3.10.0030.07713.66
5.3.00.0200.04013.70
5.2.170.0130.05311.13
5.2.160.0130.03711.21
5.2.150.0070.05711.06
5.2.140.0130.05711.21
5.2.130.0070.05311.08
5.2.120.0200.05011.18
5.2.110.0200.03711.18
5.2.100.0100.05711.10
5.2.90.0000.05011.09
5.2.80.0130.03711.06
5.2.70.0070.04311.04
5.2.60.0100.04311.05
5.2.50.0170.03710.99
5.2.40.0030.05011.00
5.2.30.0100.04011.06
5.2.20.0100.05311.17
5.2.10.0130.05310.76
5.2.00.0130.04710.81
5.1.60.0070.0339.95
5.1.50.0100.0439.92
5.1.40.0170.03010.22
5.1.30.0100.04710.30
5.1.20.0100.04710.51
5.1.10.0070.03710.13
5.1.00.0130.03010.07
5.0.50.0000.0438.70
5.0.40.0070.0378.45
5.0.30.0100.0538.29
5.0.20.0100.0278.24
5.0.10.0070.0378.41
5.0.00.0100.0407.99
4.4.90.0130.0207.02
4.4.80.0030.0207.02
4.4.70.0030.0237.02
4.4.60.0000.0277.02
4.4.50.0030.0307.02
4.4.40.0070.0437.02
4.4.30.0030.0307.02
4.4.20.0100.0177.02
4.4.10.0170.0177.02
4.4.00.0000.0437.02
4.3.110.0070.0277.02
4.3.100.0070.0307.02
4.3.90.0070.0207.02
4.3.80.0070.0377.02
4.3.70.0000.0237.02
4.3.60.0000.0237.02
4.3.50.0070.0207.02
4.3.40.0030.0377.02
4.3.30.0070.0177.02
4.3.20.0000.0237.02
4.3.10.0070.0237.02
4.3.00.0030.0237.24

preferences:
40.02 ms | 401 KiB | 5 Q