3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo\PHP7; class Foo {} namespace Foo\PHP5; class Foo {} namespace Foo; if (version_compare(PHP_VERSION, '7.0.0', '<')) { class_alias('\Foo\PHP5\Foo', '\Foo\Foo'); } else { class_alias('\Foo\PHP7\Foo', '\Foo\Foo'); } $a = new \Foo\Foo(); var_Dump(get_class($a));

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.0070.00718.25
8.3.50.0110.00921.21
8.3.40.0090.00618.50
8.3.30.0130.01018.64
8.3.20.0000.00720.34
8.3.10.0040.00423.53
8.3.00.0050.00323.53
8.2.180.0110.00716.50
8.2.170.0070.01722.96
8.2.160.0140.00722.23
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00017.47
8.2.110.0070.00321.12
8.2.100.0130.00017.91
8.2.90.0040.00419.09
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0000.00818.02
8.2.50.0030.00618.07
8.2.40.0050.00519.32
8.2.30.0030.00619.87
8.2.20.0000.00817.69
8.2.10.0000.00717.96
8.2.00.0040.00417.97
8.1.280.0040.01125.92
8.1.270.0040.00420.17
8.1.260.0030.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00322.12
8.1.230.0030.00720.89
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.22
8.1.180.0000.00718.10
8.1.170.0050.00318.52
8.1.160.0000.00721.94
8.1.150.0050.00318.88
8.1.140.0040.00417.53
8.1.130.0030.00317.66
8.1.120.0040.00417.31
8.1.110.0050.00317.37
8.1.100.0080.00017.37
8.1.90.0000.00717.45
8.1.80.0040.00417.37
8.1.70.0040.00417.36
8.1.60.0080.00017.59
8.1.50.0080.00017.53
8.1.40.0060.00317.46
8.1.30.0030.00517.56
8.1.20.0000.00717.64
8.1.10.0040.00417.51
8.1.00.0000.00817.44
8.0.300.0080.00018.77
8.0.290.0000.00816.75
8.0.280.0040.00418.40
8.0.270.0040.00417.27
8.0.260.0000.00917.13
8.0.250.0040.00416.98
8.0.240.0030.00316.98
8.0.230.0000.00716.84
8.0.220.0000.00816.85
8.0.210.0080.00016.93
8.0.200.0030.00316.96
8.0.190.0040.00416.86
8.0.180.0040.00416.88
8.0.170.0000.00716.91
8.0.160.0070.00017.01
8.0.150.0040.00416.81
8.0.140.0070.00016.77
8.0.130.0000.00513.36
8.0.120.0080.00016.91
8.0.110.0040.00416.88
8.0.100.0040.00416.79
8.0.90.0000.00816.77
8.0.80.0070.01416.80
8.0.70.0040.00416.73
8.0.60.0000.00816.91
8.0.50.0000.00716.94
8.0.30.0120.00717.09
8.0.20.0090.01417.40
8.0.10.0000.00716.96
8.0.00.0150.00516.85
7.4.330.0050.00015.21
7.4.320.0070.00016.63
7.4.300.0000.00616.51
7.4.290.0070.00316.37
7.4.280.0080.00016.63
7.4.270.0040.00416.52
7.4.260.0030.00316.61
7.4.250.0040.00416.62
7.4.240.0000.00716.49
7.4.230.0040.00416.56
7.4.220.0140.01016.65
7.4.210.0140.00016.64
7.4.200.0000.00716.60
7.4.160.0100.00516.43
7.4.150.0130.01317.40
7.4.140.0130.00817.86
7.4.130.0060.01116.54
7.4.120.0060.01116.43
7.4.110.0060.00916.54
7.4.100.0180.00616.55
7.4.90.0090.01616.40
7.4.80.0080.00919.39
7.4.70.0030.01316.45
7.4.60.0070.01016.40
7.4.50.0080.00016.52
7.4.40.0110.00916.63
7.4.30.0080.00816.61
7.4.00.0030.01315.02
7.3.330.0030.00313.00
7.3.320.0000.00513.09
7.3.310.0040.00416.23
7.3.300.0070.00016.14
7.3.290.0100.00916.11
7.3.280.0080.01116.13
7.3.270.0140.00417.40
7.3.260.0030.01416.35
7.3.250.0100.01116.33
7.3.240.0120.00816.23
7.3.230.0100.01316.39
7.3.210.0070.01616.28
7.3.200.0130.00316.38
7.3.190.0120.00316.34
7.3.180.0090.01216.19
7.3.170.0090.01316.28
7.3.160.0170.00716.37
7.2.330.0070.01016.48
7.2.320.0070.01016.43
7.2.310.0120.00616.41
7.2.300.0090.00916.40
7.2.290.0150.00916.52
7.2.60.0130.00716.58
7.2.50.0040.01216.73
7.2.00.0030.01019.51
7.1.200.0100.00315.54
7.1.70.0030.00717.20
7.1.60.0100.01419.12
7.1.50.0110.01416.83
7.1.00.0000.08022.35
7.0.200.0190.00616.75
7.0.60.0100.07019.80
7.0.50.0130.07717.86
7.0.40.0000.04720.38
7.0.30.0300.07720.17
7.0.20.0270.06020.16
7.0.10.0170.04020.19
7.0.00.0170.07020.03
5.6.280.0100.04020.89
5.6.210.0170.07320.72
5.6.200.0100.06018.18
5.6.190.0100.08020.50
5.6.180.0470.06320.64
5.6.170.0330.04720.71
5.6.160.0070.08320.39
5.6.150.0070.04018.14
5.6.140.0070.04718.29
5.6.130.0070.06018.26
5.6.120.0030.05321.11
5.6.110.0000.04320.93
5.6.100.0070.09320.98
5.6.90.0170.07720.96
5.6.80.0100.06320.43
5.5.350.0200.07720.41
5.5.340.0000.09018.05
5.5.330.0030.07320.25
5.5.320.0270.05320.34
5.5.310.0200.08320.25
5.5.300.0000.04317.97
5.5.290.0030.07017.95
5.5.280.0130.07320.87
5.5.270.0130.04720.86
5.5.260.0100.08320.98
5.5.250.0030.05720.59
5.5.240.0000.08320.15
5.4.450.0300.08019.60
5.4.440.0870.05719.47
5.4.430.0930.05319.60
5.4.420.0800.06319.70
5.4.410.0900.05019.42
5.4.400.0830.06019.30
5.4.390.0830.06719.28
5.4.380.0700.06019.25
5.4.370.0930.04718.96
5.4.360.0830.06019.28
5.4.350.0830.05719.13
5.4.340.0900.07319.16
5.4.320.0800.05319.16
5.4.310.0730.05319.14
5.4.300.0830.04719.15
5.4.290.0900.03719.14
5.4.280.0830.04719.03
5.4.270.0770.04719.08
5.4.260.0900.05019.14
5.4.250.1000.06319.11
5.4.240.1030.04318.83
5.4.230.0770.05019.22
5.4.220.0670.06319.12
5.4.210.0800.05319.11
5.4.200.0830.05316.87
5.4.190.0700.05319.16
5.4.180.0930.05019.00
5.4.170.0900.05718.90
5.4.160.0930.04718.97
5.4.150.0930.05018.97
5.4.140.0870.05316.45
5.4.130.0800.05316.46
5.4.120.0930.05316.43
5.4.110.0970.06316.41
5.4.100.0800.06016.55
5.4.90.1000.04016.75
5.4.80.0730.05016.39
5.4.70.1070.05316.57
5.4.60.0800.04316.27
5.4.50.0900.04016.51
5.4.40.0770.05016.27
5.4.30.0800.04716.38
5.4.20.0900.07016.37
5.4.10.0800.04716.45
5.4.00.0830.05315.86
5.3.290.0900.05314.73
5.3.280.1000.05314.67
5.3.270.1070.05014.67
5.3.260.0930.06314.68
5.3.250.0930.05714.58
5.3.240.0770.05014.73
5.3.230.0800.05014.74
5.3.220.0770.06314.54
5.3.210.0730.05314.52
5.3.200.0830.04314.85
5.3.190.0800.04714.69
5.3.180.0830.04014.76
5.3.170.0730.05014.67
5.3.160.0900.05014.76
5.3.150.0770.07014.52
5.3.140.0770.06014.63
5.3.130.1100.04314.51
5.3.120.0630.06314.57
5.3.110.0870.05014.69
5.3.100.0930.04714.10
5.3.90.0770.05313.99
5.3.80.0730.04013.99
5.3.70.1100.04314.13
5.3.60.0870.04713.96
5.3.50.1000.07714.07
5.3.40.1130.05714.23
5.3.30.0870.04714.04
5.3.20.0930.04713.90
5.3.10.1130.04013.86
5.3.00.0970.04313.75
5.2.170.0700.05311.16
5.2.160.0770.04710.99
5.2.150.0770.04311.20
5.2.140.0800.04711.16
5.2.130.0930.02710.99
5.2.120.0870.05311.04
5.2.110.0800.04311.16
5.2.100.0600.05011.06
5.2.90.0770.04311.26
5.2.80.0600.04011.14
5.2.70.0600.04011.11
5.2.60.0930.04311.13
5.2.50.0600.04010.85
5.2.40.0470.04010.97
5.2.30.0630.03710.80
5.2.20.0430.05310.80
5.2.10.0500.04010.77
5.2.00.0470.03710.76
5.1.60.0070.0339.88
5.1.50.0030.0379.88
5.1.40.0000.0409.98
5.1.30.0070.03310.41
5.1.20.0370.03310.25
5.1.10.0500.04010.23
5.1.00.0400.04310.13
5.0.50.0270.0278.46
5.0.40.0170.0308.46
5.0.30.0230.0508.20
5.0.20.0030.0278.08
5.0.10.0070.0278.06
5.0.00.0000.0478.21
4.4.90.0000.0237.20
4.4.80.0030.0237.20
4.4.70.0070.0207.20
4.4.60.0000.0237.20
4.4.50.0000.0237.20
4.4.40.0270.0337.20
4.4.30.0170.0307.20
4.4.20.0300.0277.20
4.4.10.0130.0307.20
4.4.00.0370.0337.20
4.3.110.0270.0237.20
4.3.100.0300.0237.20
4.3.90.0270.0177.20
4.3.80.0270.0307.20
4.3.70.0170.0277.20
4.3.60.0230.0207.20
4.3.50.0270.0207.20
4.3.40.0230.0377.20
4.3.30.0200.0207.20
4.3.20.0170.0277.20
4.3.10.0130.0237.20
4.3.00.0100.0277.23

preferences:
49.82 ms | 401 KiB | 5 Q