3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $name = 'foo'; public static function make() { $this->clazz = get_class($this); return new $this->clazz(); } } class Bar extends Foo { private $name = 'bar'; } print_r(Foo::make()); print_r(Bar::make());

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.0120.00616.88
8.3.50.0130.00521.19
8.3.40.0150.00318.79
8.3.30.0140.00718.69
8.3.20.0050.00320.16
8.3.10.0040.00423.33
8.3.00.0070.00419.66
8.2.180.0150.00325.92
8.2.170.0070.01418.82
8.2.160.0080.00622.96
8.2.150.0050.00325.66
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0040.00417.63
8.2.110.0120.00022.21
8.2.100.0090.00317.75
8.2.90.0060.00319.26
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0050.00317.80
8.2.50.0000.00818.07
8.2.40.0070.00019.34
8.2.30.0000.00918.06
8.2.20.0000.00817.68
8.2.10.0040.00417.89
8.2.00.0030.00518.05
8.1.280.0090.00625.92
8.1.270.0120.00324.01
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00522.05
8.1.230.0080.00417.42
8.1.220.0050.00217.74
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0040.00417.10
8.1.180.0080.00018.10
8.1.170.0030.00518.32
8.1.160.0080.00021.99
8.1.150.0050.00218.87
8.1.140.0030.00717.32
8.1.130.0030.00317.56
8.1.120.0000.00717.38
8.1.110.0040.00417.32
8.1.100.0040.00417.18
8.1.90.0030.00517.22
8.1.80.0050.00317.33
8.1.70.0000.00717.20
8.1.60.0060.00317.53
8.1.50.0000.00817.36
8.1.40.0040.00417.45
8.1.30.0000.00817.58
8.1.20.0000.00817.64
8.1.10.0000.00717.51
8.1.00.0040.00417.48
8.0.300.0040.00418.77
8.0.290.0080.00016.63
8.0.280.0030.00318.37
8.0.270.0070.00016.81
8.0.260.0050.00317.24
8.0.250.0000.00716.98
8.0.240.0040.00416.93
8.0.230.0000.00716.82
8.0.220.0070.00016.88
8.0.210.0040.00416.95
8.0.200.0000.00616.90
8.0.190.0000.00716.95
8.0.180.0040.00416.79
8.0.170.0030.00616.86
8.0.160.0040.00416.86
8.0.150.0000.00716.86
8.0.140.0040.00416.86
8.0.130.0000.00613.35
8.0.120.0020.00516.88
8.0.110.0070.00016.95
8.0.100.0050.00216.77
8.0.90.0040.00416.92
8.0.80.0090.00616.84
8.0.70.0070.00016.84
8.0.60.0040.00416.95
8.0.50.0040.00416.84
8.0.30.0070.01117.11
8.0.20.0130.00817.40
8.0.10.0050.00216.82
8.0.00.0070.01116.69
7.4.330.0000.00515.08
7.4.320.0000.00616.38
7.4.300.0030.00316.42
7.4.290.0040.00416.29
7.4.280.0040.00416.43
7.4.270.0070.00016.53
7.4.260.0030.00716.54
7.4.250.0040.00416.43
7.4.240.0020.00616.32
7.4.230.0070.00016.52
7.4.220.0090.00916.65
7.4.210.0100.01016.58
7.4.200.0070.00016.28
7.4.160.0080.00716.53
7.4.150.0150.00317.40
7.4.140.0080.01317.86
7.4.130.0120.01216.41
7.4.120.0080.01016.50
7.4.110.0180.00016.38
7.4.100.0070.01516.70
7.4.90.0100.00716.40
7.4.80.0070.01019.39
7.4.70.0040.01316.63
7.4.60.0070.01016.48
7.4.50.0000.00916.34
7.4.40.0070.01016.40
7.4.30.0070.01016.55
7.4.00.0070.00814.71
7.3.330.0050.00013.36
7.3.320.0030.00213.23
7.3.310.0050.00216.46
7.3.300.0030.00316.36
7.3.290.0080.00916.28
7.3.280.0110.00816.38
7.3.270.0150.00317.40
7.3.260.0120.00916.42
7.3.240.0060.01016.21
7.3.230.0130.00316.39
7.3.210.0100.01016.39
7.3.200.0090.00616.43
7.3.190.0060.00916.50
7.3.180.0070.00716.38
7.3.170.0060.01016.48
7.3.160.0170.00016.36
7.3.120.0070.01114.55
7.3.110.0030.01314.88
7.3.100.0070.00714.94
7.3.90.0110.00014.75
7.3.80.0150.00315.07
7.3.70.0060.01214.81
7.3.60.0060.00614.51
7.3.50.0000.01414.98
7.3.40.0100.00014.82
7.3.30.0030.01014.79
7.3.20.0000.01016.79
7.3.10.0000.00916.27
7.3.00.0000.01216.27
7.2.330.0150.00316.68
7.2.320.0040.01816.50
7.2.310.0160.00616.29
7.2.300.0100.00716.49
7.2.290.0100.00716.43
7.2.250.0120.00914.52
7.2.240.0070.01314.70
7.2.230.0160.00314.76
7.2.220.0030.00814.95
7.2.210.0100.00614.89
7.2.200.0120.00414.82
7.2.190.0060.00914.73
7.2.180.0100.00714.74
7.2.170.0080.00814.72
7.2.60.0060.00616.72
7.1.330.0090.00615.85
7.1.320.0060.00315.59
7.1.310.0060.00915.31
7.1.300.0070.01015.68
7.1.290.0040.00415.57
7.1.280.0070.00415.35
7.1.270.0030.01015.68
7.1.260.0070.00715.76
7.1.200.0230.00015.34
7.1.100.0070.00717.48
7.1.70.0060.00916.69
7.1.60.0040.01819.27
7.1.50.0060.01316.89
7.1.00.0030.07722.54
7.0.200.0530.00414.42
7.0.60.0070.07719.88
7.0.50.0130.07717.85
7.0.40.0100.06720.22
7.0.30.0600.06020.23
7.0.20.0200.04020.15
7.0.10.0200.07020.26
7.0.00.0030.09020.19
5.6.280.0030.03020.93
5.6.210.0070.07020.52
5.6.200.0100.03318.14
5.6.190.0070.05320.42
5.6.180.0200.05320.64
5.6.170.0170.04320.44
5.6.160.0130.08020.48
5.6.150.0030.04318.16
5.6.140.0030.08718.28
5.6.130.0100.08318.17
5.6.120.0070.04021.00
5.6.110.0100.05720.98
5.6.100.0070.08721.00
5.6.90.0070.04021.13
5.6.80.0070.04020.51
5.5.350.0100.04720.41
5.5.340.0030.07017.93
5.5.330.0070.04320.35
5.5.320.0030.04020.27
5.5.310.0130.05020.32
5.5.300.0100.06717.92
5.5.290.0030.08318.08
5.5.280.0030.04020.85
5.5.270.0030.08720.76
5.5.260.0070.07320.63
5.5.250.0030.05020.50
5.5.240.4170.03320.32
5.4.450.0770.05719.57
5.4.440.0770.06019.69
5.4.430.0730.05719.15
5.4.420.0730.05019.46
5.4.410.0700.05719.35
5.4.400.0870.04719.23
5.4.390.1070.06318.95
5.4.380.0630.05318.85
5.4.370.0530.06018.83
5.4.360.0870.05019.28
5.4.350.0630.05019.27
5.4.340.0800.05319.06
5.4.320.0770.06019.23
5.4.310.0770.05319.00
5.4.300.0870.06019.12
5.4.290.0870.06319.27
5.4.280.0730.06318.82
5.4.270.0800.04719.22
5.4.260.0830.05318.84
5.4.250.0730.05719.28
5.4.240.0830.05319.19
5.4.230.0800.05019.24
5.4.220.0830.05319.14
5.4.210.0800.05319.14
5.4.200.0730.05319.36
5.4.190.0730.04018.99
5.4.180.0630.05319.36
5.4.170.0600.05719.09
5.4.160.0700.05019.09
5.4.150.0630.05319.27
5.4.140.0700.04316.57
5.4.130.0630.04716.60
5.4.120.0670.04716.48
5.4.110.0800.05016.66
5.4.100.0800.05016.24
5.4.90.0970.06716.48
5.4.80.0800.04716.23
5.4.70.0370.02716.58
5.4.60.0200.05016.23
5.4.50.0000.07316.51
5.4.40.0030.05316.51
5.4.30.0070.06716.21
5.4.20.0330.06316.38

preferences:
39.46 ms | 401 KiB | 5 Q