3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected static $masks = array( 'default' => 'somemask\n', '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'); $a->method(); $a->method('undefined');

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.0130.00718.55
8.3.50.0070.01022.01
8.3.40.0110.00318.67
8.3.30.0070.00719.01
8.3.20.0080.00020.05
8.3.10.0040.00422.14
8.3.00.0080.00022.42
8.2.180.0120.00316.74
8.2.170.0040.01122.96
8.2.160.0120.00322.11
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.60
8.2.110.0000.00822.17
8.2.100.0040.00717.72
8.2.90.0040.00419.35
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0000.00918.03
8.2.50.0030.00618.07
8.2.40.0080.00018.47
8.2.30.0040.00818.05
8.2.20.0060.00317.71
8.2.10.0040.00419.34
8.2.00.0040.00417.61
8.1.280.0030.01725.92
8.1.270.0080.00022.11
8.1.260.0130.00626.35
8.1.250.0040.00428.09
8.1.240.0050.00323.97
8.1.230.0110.00019.00
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0030.00717.00
8.1.190.0030.00517.29
8.1.180.0080.00018.10
8.1.170.0000.00818.54
8.1.160.0000.00721.95
8.1.150.0040.00418.62
8.1.140.0050.00317.29
8.1.130.0000.00817.83
8.1.120.0000.00717.40
8.1.110.0070.00017.45
8.1.100.0050.00217.37
8.1.90.0020.00517.37
8.1.80.0040.00417.29
8.1.70.0030.00517.29
8.1.60.0030.00617.46
8.1.50.0000.00817.45
8.1.40.0080.00017.39
8.1.30.0070.00017.62
8.1.20.0030.00517.54
8.1.10.0040.00417.46
8.1.00.0060.00317.52
8.0.300.0070.00018.77
8.0.290.0000.00716.93
8.0.280.0030.00318.44
8.0.270.0000.00717.26
8.0.260.0070.00016.85
8.0.250.0050.00216.92
8.0.240.0000.00816.98
8.0.230.0000.00716.85
8.0.220.0000.00716.83
8.0.210.0040.00416.70
8.0.200.0040.00416.87
8.0.190.0030.00316.75
8.0.180.0070.00016.80
8.0.170.0000.00816.85
8.0.160.0030.00516.70
8.0.150.0000.00716.79
8.0.140.0000.00716.81
8.0.130.0000.00813.22
8.0.120.0000.00816.78
8.0.110.0040.00416.72
8.0.100.0000.00716.60
8.0.90.0050.00316.78
8.0.80.0170.00016.88
8.0.70.0040.00416.80
8.0.60.0030.00316.70
8.0.50.0000.00716.65
8.0.30.0150.00617.12
8.0.20.0110.00817.40
8.0.10.0000.00717.01
8.0.00.0120.00916.85
7.4.330.0050.00015.00
7.4.320.0030.00316.56
7.4.300.0030.00316.50
7.4.290.0060.00016.51
7.4.280.0000.00716.44
7.4.270.0030.00316.49
7.4.260.0030.00316.55
7.4.250.0070.00016.56
7.4.240.0040.00316.59
7.4.230.0000.00716.39
7.4.220.0060.01216.66
7.4.210.0080.00916.59
7.4.200.0070.00016.38
7.4.190.0030.00316.63
7.4.160.0040.01116.44
7.4.150.0140.00317.40
7.4.140.0070.01017.86
7.4.130.0060.01016.62
7.4.120.0110.00916.50
7.4.110.0110.00616.40
7.4.100.0090.00916.50
7.4.90.0120.00616.38
7.4.80.0030.01519.39
7.4.70.0100.00716.57
7.4.60.0110.00816.52
7.4.50.0000.00716.65
7.4.40.0060.00922.77
7.4.30.0090.00916.55
7.4.00.0140.00315.11
7.3.330.0050.00013.14
7.3.320.0000.00513.35
7.3.310.0030.00616.40
7.3.300.0040.00416.35
7.3.290.0100.01016.34
7.3.280.0100.00816.24
7.3.270.0150.00617.40
7.3.260.0060.01316.51
7.3.250.0100.00616.30
7.3.240.0120.00416.27
7.3.230.0140.00716.39
7.3.210.0030.01616.41
7.3.200.0060.00916.36
7.3.190.0140.00716.43
7.3.180.0080.00816.32
7.3.170.0140.00716.37
7.3.160.0110.00416.35
7.3.120.0090.00614.91
7.2.330.0060.01216.74
7.2.320.0060.01216.80
7.2.310.0090.00616.37
7.2.300.0120.00616.77
7.2.290.0070.01016.47
7.2.60.0040.00716.54
7.2.00.0060.00619.37
7.1.200.0070.00615.77
7.1.100.0040.00718.17
7.1.70.0000.00917.21
7.1.60.0110.01419.82
7.1.50.0090.01217.02
7.1.00.0100.07022.57
7.0.200.0060.00616.59
7.0.140.0070.07322.07
7.0.60.0130.05019.95
7.0.50.0100.03717.91
7.0.40.0130.08320.26
7.0.30.0270.08020.20
7.0.20.0200.03720.16
7.0.10.0270.04320.06
7.0.00.0000.09020.34
5.6.280.0100.06721.03
5.6.210.0030.08020.59
5.6.200.0070.08018.18
5.6.190.0100.04320.60
5.6.180.3530.04020.61
5.6.170.0300.04720.47
5.6.160.0100.08020.55
5.6.150.0000.06318.22
5.6.140.0100.08018.19
5.6.130.0170.05018.16
5.6.120.0130.06021.00
5.6.110.0070.06021.04
5.6.100.0100.08320.97
5.6.90.0130.07021.02
5.6.80.0070.05720.57
5.6.70.0370.06020.37
5.5.350.0000.08320.48
5.5.340.0170.05017.95
5.5.330.0100.07720.40
5.5.320.0200.08320.38
5.5.310.0370.05720.34
5.5.300.0070.08018.08
5.5.290.0030.08317.94
5.5.280.0000.09020.90
5.5.270.0130.08320.76
5.5.260.0070.08020.96
5.5.250.0170.07020.69
5.5.240.0070.04020.13
5.4.450.0730.05319.60
5.4.440.0630.05319.45
5.4.430.0100.05319.45
5.4.420.0130.05019.52
5.4.410.0200.04319.41
5.4.400.0830.00018.62
5.4.390.0670.00018.69
5.4.380.0230.05318.84
5.4.370.0170.05018.46
5.4.360.0030.06318.59
5.4.350.0130.05718.84
5.4.340.0170.05018.50
5.4.320.0060.03612.50
5.4.310.0060.03712.50
5.4.300.0070.03512.50
5.4.290.0090.03612.50
5.4.280.0080.03312.40
5.4.270.0130.05018.76
5.4.260.0070.05318.95
5.4.250.0100.07718.93
5.4.240.0070.07019.02
5.4.230.0200.07018.74
5.4.220.0030.08018.74
5.4.210.0230.05318.84
5.4.200.0170.06718.94
5.4.190.0200.04719.00
5.4.180.0100.05318.79
5.4.170.0100.05718.76
5.4.160.0070.06018.93
5.4.150.0100.06018.82
5.4.140.0070.07316.60
5.4.130.0130.04316.54
5.4.120.0170.05316.38
5.4.110.0100.07016.48
5.4.100.0130.05716.41
5.4.90.0170.05316.46
5.4.80.0100.06016.39
5.4.70.0200.05716.50
5.4.60.0170.06316.46
5.4.50.0100.06016.49
5.4.40.0070.07316.54
5.4.30.0200.04316.43
5.4.20.0070.06016.45
5.4.10.0100.06016.48
5.4.00.0270.06015.78
5.3.290.0080.03612.80
5.3.280.0200.06314.82
5.3.270.0200.07314.69
5.3.260.0130.05014.70
5.3.250.0100.06314.74
5.3.240.0200.05014.58
5.3.230.0130.07014.82
5.3.220.0030.08714.65
5.3.210.0170.07014.65
5.3.200.0100.07014.71
5.3.190.0030.06314.39
5.3.180.0130.06714.47
5.3.170.0200.05314.58
5.3.160.0130.06714.58
5.3.150.0070.07014.63
5.3.140.0170.05014.63
5.3.130.0200.07714.77
5.3.120.0100.07314.52
5.3.110.0130.05714.61
5.3.100.0230.06314.10
5.3.90.0070.07314.03
5.3.80.0200.05013.85
5.3.70.0100.04714.00
5.3.60.0100.06714.08
5.3.50.0200.04313.96
5.3.40.0130.05713.97
5.3.30.0070.05314.00
5.3.20.0100.06313.86
5.3.10.0200.05713.72
5.3.00.0070.05013.62
5.2.170.0100.04011.05
5.2.160.0070.04011.05
5.2.150.0000.05311.21
5.2.140.0070.05711.22
5.2.130.0100.04311.10
5.2.120.0070.05311.08
5.2.110.0100.04711.17
5.2.100.0100.05711.06
5.2.90.0070.04711.28
5.2.80.0030.05311.08
5.2.70.0100.04711.06
5.2.60.0000.05311.04
5.2.50.0130.04010.85
5.2.40.0100.04711.08
5.2.30.0130.05310.93
5.2.20.0130.05011.17
5.2.10.0100.03711.02
5.2.00.0100.05010.71
5.1.60.0000.0539.84
5.1.50.0100.03010.15
5.1.40.0070.0479.94
5.1.30.0070.05010.51
5.1.20.0100.03310.18
5.1.10.0030.0409.99
5.1.00.0070.04010.04
5.0.50.0070.0378.46
5.0.40.0000.0338.50
5.0.30.0000.0608.32
5.0.20.0030.0278.14
5.0.10.0070.0378.09
5.0.00.0070.0378.07
4.4.90.0030.0306.83
4.4.80.0070.0206.83
4.4.70.0000.0236.83
4.4.60.0070.0276.83
4.4.50.0030.0206.83
4.4.40.0030.0436.83
4.4.30.0100.0176.83
4.4.20.0000.0336.83
4.4.10.0030.0276.83
4.4.00.0000.0436.83
4.3.110.0030.0206.83
4.3.100.0070.0206.83
4.3.90.0030.0306.83
4.3.80.0070.0406.83
4.3.70.0030.0336.83
4.3.60.0030.0236.83
4.3.50.0030.0306.83
4.3.40.0030.0336.83
4.3.30.0100.0176.83
4.3.20.0030.0236.83
4.3.10.0100.0206.83
4.3.00.0000.0236.53

preferences:
39.55 ms | 401 KiB | 5 Q