3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo\Bar; class A { } class B { public function __construct($type) { $fullType = 'Foo\\Bar\\' . $type; echo "try to create $fullType\n"; new $fullType; echo "$fullType created\n"; $fullType = get_class($type . '::class'); echo "try to create $type::class ($fullType)\n"; new $fullType; echo "$type::class ($fullType) created\n"; echo "try to create $type\n"; new $type; echo "$type created\n"; } } new A; new B('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.0150.00018.30
8.3.50.0080.01021.86
8.3.40.0070.00719.00
8.3.30.0030.01019.03
8.3.20.0080.00020.20
8.3.10.0090.00921.86
8.3.00.0080.00022.26
8.2.180.0080.01116.63
8.2.170.0070.00722.96
8.2.160.0000.01521.11
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00419.36
8.2.110.0030.00622.10
8.2.100.0110.00017.91
8.2.90.0030.00619.22
8.2.80.0030.00518.05
8.2.70.0030.00617.50
8.2.60.0080.00317.78
8.2.50.0030.00618.07
8.2.40.0040.00418.03
8.2.30.0040.00418.12
8.2.20.0000.00717.77
8.2.10.0050.00317.77
8.2.00.0040.00417.81
8.1.280.0140.00725.92
8.1.270.0040.00422.20
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00420.95
8.1.230.0080.00319.06
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.36
8.1.190.0040.00417.55
8.1.180.0070.00018.80
8.1.170.0030.00518.55
8.1.160.0040.00422.00
8.1.150.0040.00418.61
8.1.140.0070.00017.47
8.1.130.0030.00317.84
8.1.120.0000.00717.34
8.1.110.0000.00817.39
8.1.100.0000.00717.42
8.1.90.0040.00417.32
8.1.80.0040.00417.46
8.1.70.0000.00717.30
8.1.60.0080.00417.53
8.1.50.0000.00717.55
8.1.40.0040.00417.45
8.1.30.0030.00517.52
8.1.20.0080.00017.64
8.1.10.0000.00717.61
8.1.00.0000.00817.54
8.0.300.0070.00318.77
8.0.290.0000.00717.05
8.0.280.0030.00318.48
8.0.270.0000.00717.36
8.0.260.0060.00016.84
8.0.250.0030.00317.04
8.0.240.0050.00317.02
8.0.230.0000.00717.12
8.0.220.0000.00817.04
8.0.210.0000.00716.96
8.0.200.0000.00717.00
8.0.190.0080.00017.09
8.0.180.0000.00717.06
8.0.170.0080.00016.98
8.0.160.0000.00816.97
8.0.150.0070.00316.97
8.0.140.0050.00216.86
8.0.130.0030.00313.42
8.0.120.0080.00016.93
8.0.110.0020.00516.89
8.0.100.0030.00517.06
8.0.90.0000.00716.87
8.0.80.0120.00616.90
8.0.70.0000.00916.86
8.0.60.0000.00716.85
8.0.50.0040.00416.87
8.0.30.0120.00917.03
8.0.20.0080.00917.40
8.0.10.0020.00516.95
8.0.00.0090.00916.89
7.4.330.0030.00315.00
7.4.320.0000.00616.47
7.4.300.0000.00816.59
7.4.290.0080.00016.49
7.4.280.0030.00316.68
7.4.270.0080.00016.55
7.4.260.0030.00316.52
7.4.250.0070.00016.51
7.4.240.0000.00716.53
7.4.230.0070.00016.43
7.4.220.0130.00716.50
7.4.210.0110.00516.56
7.4.200.0070.00016.62
7.4.190.0000.00716.65
7.4.160.0120.00416.52
7.4.150.0180.00017.40
7.4.140.0100.00817.86
7.4.130.0110.00816.52
7.4.120.0110.00816.58
7.4.110.0090.00916.62
7.4.100.0100.00716.39
7.4.90.0030.01416.64
7.4.80.0150.00719.39
7.4.70.0120.00616.55
7.4.60.0180.00016.61
7.4.50.0000.00816.59
7.4.40.0040.00822.77
7.4.30.0060.00916.48
7.4.00.0090.00515.14
7.3.330.0030.00313.32
7.3.320.0060.00013.21
7.3.310.0040.00416.45
7.3.300.0000.00716.33
7.3.290.0130.00616.38
7.3.280.0070.01116.45
7.3.270.0100.01017.40
7.3.260.0030.02116.44
7.3.250.0160.00516.64
7.3.240.0090.01016.63
7.3.230.0000.01716.41
7.3.210.0140.00316.50
7.3.200.0130.00319.39
7.3.190.0090.00916.59
7.3.180.0040.01216.41
7.3.170.0070.01316.61
7.3.160.0130.00316.39
7.3.120.0090.00516.09
7.3.110.0080.00616.08
7.3.100.0030.01316.05
7.3.90.0030.01315.97
7.3.80.0060.00616.06
7.3.70.0030.00915.95
7.3.60.0080.00715.99
7.3.50.0040.00915.96
7.3.40.0070.00516.03
7.3.30.0070.00515.86
7.3.20.0080.00516.83
7.3.10.0050.00816.86
7.3.00.0070.00716.78
7.2.330.0130.00416.38
7.2.320.0090.00916.52
7.2.310.0090.00616.32
7.2.300.0130.00316.69
7.2.290.0070.01016.74
7.2.250.0090.00915.27
7.2.240.0090.00916.20
7.2.230.0050.00815.98
7.2.220.0050.00916.09
7.2.210.0030.01416.03
7.2.200.0030.01016.12
7.2.190.0080.00516.06
7.2.180.0050.01016.19
7.2.170.0090.00515.99
7.2.160.0070.00717.15
7.2.150.0030.01317.15
7.2.140.0030.01217.15
7.2.130.0130.00317.15
7.2.120.0030.01417.15
7.2.110.0040.01417.15
7.2.100.0070.01117.15
7.2.90.0080.00817.15
7.2.80.0070.01017.15
7.2.70.0070.01117.15
7.2.60.0060.00617.03
7.2.50.0040.00817.15
7.2.40.0070.00717.15
7.2.30.0140.00317.15
7.2.20.0120.00317.15
7.2.10.0110.00717.15
7.2.00.0100.00818.27
7.1.330.0070.00816.60
7.1.320.0060.00816.53
7.1.310.0050.01116.28
7.1.300.0080.00516.44
7.1.290.0050.01016.42
7.1.280.0060.01016.34
7.1.270.0060.01016.46
7.1.260.0060.00916.50
7.1.250.0030.01317.15
7.1.200.0070.00715.41
7.1.100.0070.00718.10
7.1.70.0030.00617.11
7.1.60.0070.01719.82
7.1.50.0050.00816.90
7.1.00.0100.07022.50
7.0.200.0030.00316.72
7.0.140.0170.06021.98
7.0.100.0030.08019.96
7.0.90.0130.07319.94
7.0.80.0030.06019.97
7.0.70.0100.05319.93
7.0.60.0100.06019.94
7.0.50.0100.07320.30
7.0.40.0070.03720.19
7.0.30.0070.08020.08
7.0.20.0030.06720.17
7.0.10.0000.04320.11
7.0.00.0070.07020.02
5.6.280.0070.06720.85
5.6.250.0070.08020.64
5.6.240.0030.08020.60
5.6.230.0030.08720.63
5.6.220.0070.07020.56
5.6.210.0170.06320.77
5.6.200.0030.08321.06
5.6.190.0130.08721.14
5.6.180.0130.05721.11
5.6.170.0070.08021.17
5.6.160.0000.08721.14
5.6.150.0030.05721.11
5.6.140.0070.08321.08
5.6.130.0170.06021.10
5.6.120.0070.06321.04
5.6.110.0070.04021.04
5.6.100.0100.06721.06
5.6.90.0100.08020.99
5.6.80.0000.04720.43
5.6.70.0070.05320.41
5.6.60.0130.07320.30
5.6.50.0100.07320.45
5.6.40.0100.07320.31
5.6.30.0030.08320.39
5.6.20.0030.04020.39
5.6.10.0070.07320.46
5.6.00.0130.07320.36
5.5.380.0070.04720.39
5.5.370.0030.05320.38
5.5.360.0030.08020.34
5.5.350.0030.07320.34
5.5.340.0030.08720.88
5.5.330.0100.07720.93
5.5.320.0000.08320.92
5.5.310.0100.07320.80
5.5.300.0030.04720.77
5.5.290.0100.07720.79
5.5.280.0030.04320.79
5.5.270.0030.05320.64
5.5.260.0100.07020.79
5.5.250.0100.08020.68
5.5.240.0070.04020.20
5.5.230.0000.07020.03
5.5.220.0000.04720.21
5.5.210.0070.03320.14
5.5.200.0100.07320.16
5.5.190.0030.08320.20
5.5.180.0200.06719.99
5.5.160.0070.05720.18
5.5.150.0030.04320.15
5.5.140.0070.07320.11
5.5.130.0070.08020.26
5.5.120.0100.03020.22
5.5.110.0070.07319.98
5.5.100.0070.07720.08
5.5.90.0070.08020.16
5.5.80.0000.04320.04
5.5.70.0000.04320.04
5.5.60.0000.08720.06
5.5.50.0030.03720.17
5.5.40.0000.08320.06
5.5.30.0070.03719.96
5.5.20.0100.03320.09
5.5.10.0070.05720.11
5.5.00.0100.03020.04
5.4.450.0000.05319.48
5.4.440.0070.04719.34
5.4.430.0130.05719.52
5.4.420.0200.07019.20
5.4.410.0070.04719.21
5.4.400.0130.06719.06
5.4.390.0100.08018.84
5.4.380.0000.07719.13
5.4.370.0030.06719.03
5.4.360.0030.05019.09
5.4.350.0070.05019.10
5.4.340.0030.04019.09
5.4.320.0130.06319.14
5.4.310.0030.08019.00
5.4.300.0100.03319.19
5.4.290.0070.04318.87
5.4.280.0000.04018.88
5.4.270.0100.07318.93
5.4.260.0070.03319.00
5.4.250.0030.08019.02
5.4.240.0100.07019.18
5.4.230.0070.05319.02
5.4.220.0100.03319.14
5.4.210.0100.06719.11
5.4.200.0100.05019.14
5.4.190.0000.05319.10
5.4.180.0030.07319.08
5.4.170.0070.04318.84
5.4.160.0070.07319.17
5.4.150.0000.07318.99
5.4.140.0070.07316.48
5.4.130.0030.03316.48
5.4.120.0070.09016.44
5.4.110.0000.03716.39
5.4.100.0000.04016.46
5.4.90.0030.03716.49
5.4.80.0000.04016.52
5.4.70.0070.03316.48
5.4.60.0000.03716.43
5.4.50.0030.03716.43
5.4.40.0030.06316.48
5.4.30.0070.03316.42
5.4.20.0030.03016.29
5.4.10.0100.04016.22
5.4.00.0100.04015.77
5.3.290.0070.06014.78
5.3.280.0000.08314.70
5.3.270.0000.04314.54
5.3.260.0070.06014.55
5.3.250.0130.07314.54
5.3.240.0070.06314.60
5.3.230.0000.08014.68
5.3.220.0070.03314.50
5.3.210.0130.03014.50
5.3.200.0070.04314.61
5.3.190.0030.04014.53
5.3.180.0000.04014.55
5.3.170.0000.04314.67
5.3.160.0100.03014.67
5.3.150.0030.04014.55
5.3.140.0030.03714.46
5.3.130.0100.03014.48
5.3.120.0070.05014.59
5.3.110.0030.04314.65
5.3.100.0100.06314.05
5.3.90.0000.04314.07
5.3.80.0070.06014.12
5.3.70.0030.03714.09
5.3.60.0070.07313.88
5.3.50.0030.03714.01
5.3.40.0170.05313.93
5.3.30.0030.06713.89
5.3.20.0070.05013.59
5.3.10.0070.04313.71
5.3.00.0070.03313.50
5.2.170.0100.05010.94
5.2.160.0030.03310.91
5.2.150.0070.03711.02
5.2.140.0030.02711.11
5.2.130.0030.03011.06
5.2.120.0030.03711.10
5.2.110.0070.04711.07
5.2.100.0030.02711.01
5.2.90.0030.03710.90
5.2.80.0000.03310.94
5.2.70.0070.03711.10
5.2.60.0030.03710.88
5.2.50.0030.05010.99
5.2.40.0070.05310.99
5.2.30.0000.04310.95
5.2.20.0070.04710.93
5.2.10.0100.02010.78
5.2.00.0030.03010.76
5.1.60.0070.0179.99
5.1.50.0000.0409.98
5.1.40.0030.0339.97
5.1.30.0070.02310.16
5.1.20.0000.02710.34
5.1.10.0030.0539.89
5.1.00.0070.02710.03
5.0.50.0100.0239.81
5.0.40.0000.0409.81
5.0.30.0030.0539.81
5.0.20.0030.0209.81
5.0.10.0030.0209.81
5.0.00.0030.0539.81
4.4.90.0000.0179.81
4.4.80.0000.0339.81
4.4.70.0000.0139.81
4.4.60.0000.0139.81
4.4.50.0030.0139.81
4.4.40.0000.0309.81
4.4.30.0000.0209.81
4.4.20.0000.0279.81
4.4.10.0000.0239.81
4.4.00.0070.0509.81
4.3.110.0030.0239.81
4.3.100.0000.0339.81
4.3.90.0030.0209.81
4.3.80.0000.0379.81
4.3.70.0000.0339.81
4.3.60.0030.0309.81
4.3.50.0000.0179.81
4.3.40.0000.0509.81
4.3.30.0030.0139.81
4.3.20.0070.0239.81
4.3.10.0000.0139.81
4.3.00.0030.0109.81

preferences:
48.74 ms | 401 KiB | 5 Q