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"; $class = A::class; new $class; 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.0140.00716.50
8.3.50.0120.00821.87
8.3.40.0110.00418.71
8.3.30.0060.00819.02
8.3.20.0050.00320.39
8.3.10.0050.00323.48
8.3.00.0080.00020.73
8.2.180.0120.00616.63
8.2.170.0100.00722.96
8.2.160.0110.00420.58
8.2.150.0060.00324.18
8.2.140.0070.00024.66
8.2.130.0000.00726.16
8.2.120.0000.00819.50
8.2.110.0030.00622.04
8.2.100.0100.00018.16
8.2.90.0080.00019.21
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0080.00417.92
8.2.50.0070.00418.07
8.2.40.0080.00419.94
8.2.30.0030.00618.18
8.2.20.0040.00417.69
8.2.10.0040.00418.16
8.2.00.0080.00019.63
8.1.280.0100.01025.92
8.1.270.0000.00823.66
8.1.260.0050.00226.35
8.1.250.0020.00528.09
8.1.240.0030.00621.93
8.1.230.0070.00419.22
8.1.220.0000.00817.78
8.1.210.0040.00418.77
8.1.200.0030.00617.47
8.1.190.0030.00517.22
8.1.180.0080.00018.10
8.1.170.0040.00418.57
8.1.160.0040.00421.98
8.1.150.0000.00718.53
8.1.140.0040.00417.32
8.1.130.0030.00317.92
8.1.120.0070.00017.41
8.1.110.0030.00517.33
8.1.100.0030.00517.47
8.1.90.0000.00717.30
8.1.80.0030.00517.33
8.1.70.0000.00717.41
8.1.60.0000.00917.61
8.1.50.0030.00617.60
8.1.40.0070.00017.56
8.1.30.0040.00417.59
8.1.20.0050.00217.51
8.1.10.0030.00617.62
8.1.00.0000.00717.52
8.0.300.0080.00018.77
8.0.290.0050.00216.75
8.0.280.0000.00718.48
8.0.270.0000.00717.20
8.0.260.0030.00317.16
8.0.250.0030.00317.06
8.0.240.0030.00316.96
8.0.230.0040.00417.03
8.0.220.0000.00716.96
8.0.210.0040.00417.05
8.0.200.0040.00417.04
8.0.190.0000.00716.98
8.0.180.0070.00017.05
8.0.170.0040.00416.93
8.0.160.0070.00016.86
8.0.150.0000.00716.90
8.0.140.0040.00416.91
8.0.130.0000.00513.45
8.0.120.0000.00717.02
8.0.110.0000.00816.93
8.0.100.0050.00216.86
8.0.90.0000.00916.86
8.0.80.0160.00716.87
8.0.70.0000.00817.00
8.0.60.0000.00716.93
8.0.50.0040.00417.05
8.0.30.0160.01017.16
8.0.20.0120.00817.40
8.0.10.0080.00017.02
8.0.00.0100.00816.86
7.4.330.0000.00515.14
7.4.320.0030.00316.45
7.4.300.0030.00316.46
7.4.290.0000.00716.55
7.4.280.0040.00416.57
7.4.270.0040.00416.64
7.4.260.0020.00516.59
7.4.250.0070.00016.60
7.4.240.0040.00416.63
7.4.230.0040.00416.68
7.4.220.0070.01016.58
7.4.210.0100.01016.66
7.4.200.0030.00316.54
7.4.160.0090.00916.65
7.4.150.0150.00317.40
7.4.140.0110.01017.86
7.4.130.0140.00616.54
7.4.120.0090.00716.47
7.4.110.0190.00616.61
7.4.100.0040.01916.42
7.4.90.0100.02716.53
7.4.80.0000.02019.39
7.4.70.0140.00316.64
7.4.60.0100.01016.59
7.4.50.0000.00616.58
7.4.40.0130.00316.55
7.4.30.0120.00316.46
7.4.00.0080.01114.93
7.3.330.0020.00213.45
7.3.320.0030.00313.38
7.3.310.0030.00316.51
7.3.300.0030.00316.32
7.3.290.0070.00716.44
7.3.280.0060.01016.36
7.3.270.0080.00817.40
7.3.260.0130.01216.61
7.3.250.0080.01116.53
7.3.240.0080.01016.69
7.3.230.0060.00916.68
7.3.210.0080.00816.42
7.3.200.0090.00619.39
7.3.190.0040.01916.43
7.3.180.0040.01116.55
7.3.170.0030.01216.54
7.3.160.0070.01416.37
7.3.120.0090.00715.04
7.3.110.0030.00814.84
7.3.100.0070.00714.80
7.3.90.0070.01114.89
7.3.80.0100.00714.97
7.3.70.0040.00814.87
7.3.60.0070.00414.95
7.3.50.0030.01014.84
7.3.40.0090.00914.63
7.3.30.0000.00914.68
7.3.20.0040.01116.54
7.3.10.0100.00716.71
7.3.00.0050.00816.63
7.2.330.0120.00616.68
7.2.320.0130.00316.73
7.2.310.0000.01716.77
7.2.300.0080.00816.32
7.2.290.0070.01116.71
7.2.250.0110.00715.15
7.2.240.0030.01615.07
7.2.230.0150.00014.86
7.2.220.0090.00614.88
7.2.210.0030.01215.07
7.2.200.0030.00914.65
7.2.190.0030.00614.90
7.2.180.0130.00614.95
7.2.170.0030.00614.98
7.2.160.0060.00315.16
7.2.150.0040.00917.08
7.2.140.0030.00916.95
7.2.130.0040.00816.95
7.2.120.0020.00816.79
7.2.110.0040.00716.94
7.2.100.0040.00816.61
7.2.90.0030.01016.99
7.2.80.0040.00617.06
7.2.70.0080.00516.89
7.2.60.0060.00616.94
7.2.50.0080.00616.77
7.2.40.0100.00317.00
7.2.30.0040.01116.76
7.2.20.0080.01116.64
7.2.10.0090.00516.99
7.2.00.0020.01417.61
7.1.330.0150.00315.55
7.1.320.0030.01015.69
7.1.310.0000.00915.79
7.1.300.0000.01215.54
7.1.290.0100.00315.86
7.1.280.0050.00315.72
7.1.270.0040.00415.65
7.1.260.0030.00915.70
7.1.250.0020.00815.91
7.1.240.0080.00615.57
7.1.230.0080.00615.70
7.1.220.0080.00515.63
7.1.210.0030.01015.85
7.1.200.0060.00615.72
7.1.190.0090.00315.87
7.1.180.0050.00615.68
7.1.170.0060.00715.77
7.1.160.0050.00615.40
7.1.150.0060.00815.68
7.1.140.0050.00915.70
7.1.130.0080.00615.64
7.1.120.0040.00915.53
7.1.110.0060.00815.88
7.1.100.0060.00816.54
7.1.90.0050.00515.78
7.1.80.0060.00615.84
7.1.70.0020.00916.05
7.1.60.0110.00616.97
7.1.50.0030.01216.11
7.1.40.0060.00715.61
7.1.30.0020.01015.86
7.1.20.0050.00815.59
7.1.10.0090.00815.63
7.1.00.0040.03217.87
7.0.330.0050.00615.24
7.0.320.0080.00615.18
7.0.310.0080.00415.20
7.0.300.0060.00715.36
7.0.290.0050.00815.42
7.0.280.0120.00215.36
7.0.270.0050.00615.42
7.0.260.0060.00815.32
7.0.250.0040.01115.26
7.0.240.0090.00515.44
7.0.230.0050.00715.34
7.0.220.0070.00715.30
7.0.210.0060.00515.35
7.0.200.0050.00715.74
7.0.190.0040.01015.41
7.0.180.0030.01015.31
7.0.170.0020.00715.27
7.0.160.0050.00715.23
7.0.150.0060.00615.32
7.0.140.0040.03017.61
7.0.130.0100.00615.34
7.0.120.0030.01115.28
7.0.110.0040.00815.27
7.0.100.0050.00815.35
7.0.90.0230.02716.79
7.0.80.0230.03216.95
7.0.70.0150.02716.74
7.0.60.0210.02916.90
7.0.50.0220.02916.88
7.0.40.0070.01815.62
7.0.30.0060.02715.71
7.0.20.0120.02415.48
7.0.10.0080.03115.54
7.0.00.0060.02315.60
5.6.400.0000.01114.56
5.6.390.0080.00414.44
5.6.380.0070.00614.23
5.6.370.0050.00714.28
5.6.360.0060.00714.65
5.6.350.0040.00914.00
5.6.340.0070.00714.29
5.6.330.0040.01014.35
5.6.320.0110.00214.06
5.6.310.0050.00814.43
5.6.300.0070.00714.25
5.6.290.0000.01414.21
5.6.280.0020.03316.64
5.6.270.0070.00714.18
5.6.260.0040.00914.44
5.6.250.0060.00614.38
5.6.240.0020.00914.41
5.6.230.0090.02616.23
5.6.220.0050.02116.47
5.6.210.0110.02916.25
5.6.200.0050.01816.55
5.6.190.0080.01916.58
5.6.180.0080.02916.57
5.6.170.0040.02516.52
5.6.160.0080.01716.41
5.6.150.0060.02316.46
5.6.140.0050.03316.47
5.6.130.0060.02316.63
5.6.120.0100.03016.52
5.6.110.0060.03316.45
5.6.100.0110.01916.60
5.6.90.0050.03516.54
5.6.80.0060.03016.32
5.6.70.0040.02616.28
5.6.60.0070.02816.15
5.6.50.0050.01816.26
5.6.40.0040.03016.35
5.6.30.0080.02716.15
5.6.20.0050.02116.25
5.6.10.0040.03116.23
5.6.00.0010.02516.39
5.5.380.0040.00712.61
5.5.370.0060.02315.24
5.5.360.0040.01715.28
5.5.350.0080.02015.25
5.5.340.0060.01915.30
5.5.330.0050.02115.39
5.5.320.0060.02815.46
5.5.310.0040.02415.34
5.5.300.0090.02915.36
5.5.290.0000.03515.34
5.5.280.0040.03315.40
5.5.270.0070.03115.46
5.5.260.0040.01915.46
5.5.250.0060.03215.16
5.5.240.0050.01815.01
5.5.230.0050.03215.03
5.5.220.0030.02315.14
5.5.210.0050.01815.23
5.5.200.0040.02615.11
5.5.190.0080.02815.08
5.5.180.0050.02215.08
5.5.170.0080.00312.59
5.5.160.0010.01012.75
5.5.150.0020.00712.73
5.5.140.0070.00712.65
5.5.130.0030.00712.34
5.5.120.0060.00612.65
5.5.110.0070.00412.68
5.5.100.0100.00012.72
5.5.90.0070.00512.63
5.5.80.0050.00812.69
5.5.70.0010.01012.51
5.5.60.0040.00612.63
5.5.50.0040.00412.73
5.5.40.0050.00612.67
5.5.30.0050.00712.55
5.5.20.0070.00512.62
5.5.10.0030.00712.59
5.5.00.0050.00512.53
5.4.450.0060.02714.46
5.4.440.0020.02814.46
5.4.430.0060.01814.45
5.4.420.0080.02014.35
5.4.410.0090.02314.38
5.4.400.0030.01814.29
5.4.390.0020.02214.33
5.4.380.0060.02814.27
5.4.370.0060.01514.31
5.4.360.0050.01914.28
5.4.350.0040.01914.31
5.4.340.0020.03414.34
5.4.330.0050.00411.89
5.4.320.0020.00611.89
5.4.310.0040.00311.89
5.4.300.0040.00711.89
5.4.290.0040.00411.89
5.4.280.0050.00311.89
5.4.270.0020.00611.89
5.4.260.0020.00611.89
5.4.250.0010.00811.89
5.4.240.0030.00411.89
5.4.230.0030.00811.89
5.4.220.0050.00211.89
5.4.210.0070.00511.91
5.4.200.0030.00611.89
5.4.190.0040.00611.89
5.4.180.0030.01011.89
5.4.170.0030.00611.89
5.4.160.0040.00511.89
5.4.150.0040.00411.89
5.4.140.0050.00611.89
5.4.130.0050.00511.89
5.4.120.0030.00511.89
5.4.110.0080.00211.89
5.4.100.0030.00711.89
5.4.90.0070.00511.89
5.4.80.0050.00711.91
5.4.70.0040.00711.89
5.4.60.0020.00711.89
5.4.50.0020.00711.90
5.4.40.0060.00411.89
5.4.30.0050.00511.89
5.4.20.0060.00611.91
5.4.10.0030.00511.89
5.4.00.0080.00211.89
5.3.290.0030.00811.89
5.3.280.0040.00411.89
5.3.270.0060.00711.89
5.3.260.0020.00811.89
5.3.250.0020.00911.89
5.3.240.0010.00811.89
5.3.230.0050.00711.89
5.3.220.0000.00711.89
5.3.210.0030.00711.89
5.3.200.0010.00711.89
5.3.190.0050.00611.89
5.3.180.0040.00511.89
5.3.170.0060.00311.89
5.3.160.0030.00311.89
5.3.150.0020.00511.89
5.3.140.0030.00811.89
5.3.130.0050.00611.89
5.3.120.0030.00611.89
5.3.110.0000.00811.89
5.3.100.0020.00511.89
5.3.90.0030.00811.89
5.3.80.0030.00411.89
5.3.70.0070.00411.89
5.3.60.0020.00811.89
5.3.50.0110.00011.89
5.3.40.0050.01912.54
5.3.30.0030.02912.59
5.3.20.0020.02912.51
5.3.10.0030.02012.51
5.3.00.0050.02312.51
5.2.170.0030.00310.90
5.2.160.0020.02912.33
5.2.150.0040.01612.33
5.2.140.0070.03312.33
5.2.130.0020.02012.33
5.2.120.0020.03512.33
5.2.110.0020.01712.33
5.2.100.0030.01712.33
5.2.90.0050.01412.33
5.2.80.0050.01512.33
5.2.70.0040.01712.33
5.2.60.0020.01812.33
5.2.50.0030.01512.33
5.2.40.0030.01712.33
5.2.30.0000.02312.33
5.2.20.0010.01612.33
5.2.10.0040.01612.33
5.2.00.0070.01212.33
5.1.60.0040.01312.33
5.1.50.0060.01312.33
5.1.40.0050.01212.33
5.1.30.0020.01712.33
5.1.20.0020.01312.33
5.1.10.0020.01412.33
5.1.00.0050.02012.33
5.0.50.0000.02212.33
5.0.40.0050.01012.33
5.0.30.0030.01612.33
5.0.20.0040.01012.33
5.0.10.0020.02012.33
5.0.00.0030.01512.33
4.4.90.0000.01212.33
4.4.80.0020.01012.33
4.4.70.0020.00712.33
4.4.60.0000.01112.33
4.4.50.0000.01412.33
4.4.40.0020.01512.33
4.4.30.0020.00812.33
4.4.20.0060.00512.33
4.4.10.0030.00812.33
4.4.00.0050.01212.33
4.3.110.0010.00812.33
4.3.100.0020.00812.33
4.3.90.0000.01612.33
4.3.80.0000.01912.33
4.3.70.0020.01312.33
4.3.60.0020.00912.33
4.3.50.0000.01012.33
4.3.40.0000.01512.33
4.3.30.0020.01312.33
4.3.20.0020.01012.33
4.3.10.0020.00812.33
4.3.00.0000.00812.33

preferences:
48.22 ms | 401 KiB | 5 Q