3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class ParentTest { public static function fromDB(string $name = '') { $instance = new static(); if (!empty($name)) { $instance->setName($name)->read(); } return $instance; } public abstract function read(); public abstract function setName(string $name): self; } class Child extends ParentTest { public function read() { } public function setName(string $name) :ParentTest { return $this; } } $child = new Child();

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.4.20.0100.01017.68
8.4.10.0090.01219.27
8.3.150.0110.00716.48
8.3.140.0110.00816.41
8.3.130.0020.00518.37
8.3.120.0080.01520.61
8.3.110.0070.00320.94
8.3.100.0110.00424.06
8.3.90.0100.01026.77
8.3.80.0060.00316.38
8.3.70.0090.00616.58
8.3.60.0150.00418.43
8.3.50.0190.00916.48
8.3.40.0070.01118.39
8.3.30.0110.00418.46
8.3.20.0040.00421.86
8.3.10.0070.00021.87
8.3.00.0040.00417.68
8.2.260.0060.00318.44
8.2.250.0090.00016.36
8.2.240.0090.00018.94
8.2.230.0000.00922.58
8.2.220.0080.00037.54
8.2.210.0050.00326.77
8.2.200.0040.00416.75
8.2.190.0070.01116.63
8.2.180.0060.00918.54
8.2.170.0070.01418.88
8.2.160.0110.00422.96
8.2.150.0030.00525.66
8.2.140.0050.00224.66
8.2.130.0070.00026.16
8.2.120.0000.00821.11
8.2.110.0100.00019.27
8.2.100.0060.00917.59
8.2.90.0030.00619.13
8.2.80.0030.00517.97
8.2.70.0000.00817.63
8.2.60.0000.00817.63
8.2.50.0040.00417.55
8.2.40.0080.00017.63
8.2.30.0000.00719.20
8.2.20.0030.00618.04
8.2.10.0040.00417.96
8.2.00.0090.00618.56
8.1.310.0120.00018.32
8.1.300.0130.00617.96
8.1.290.0100.00030.84
8.1.280.0030.01225.92
8.1.270.0050.00222.64
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0030.00619.01
8.1.230.0080.00322.20
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0100.00017.10
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0040.00417.62
8.1.160.0040.00418.75
8.1.150.0000.00720.12
8.1.140.0050.00219.54
8.1.130.0000.00717.44
8.1.120.0070.00017.25
8.1.110.0040.00417.27
8.1.100.0030.00617.36
8.1.90.0030.00517.41
8.1.80.0040.00417.33
8.1.70.0030.00317.42
8.1.60.0040.00417.50
8.1.50.0040.00417.48
8.1.40.0050.00317.33
8.1.30.0030.00717.50
8.1.20.0060.00817.50
8.1.10.0090.00317.52
8.1.00.0090.00618.07
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.43
8.0.270.0070.00017.19
8.0.260.0000.00716.73
8.0.250.0030.00316.78
8.0.240.0030.00616.95
8.0.230.0070.00016.95
8.0.220.0040.00416.86
8.0.210.0050.00516.79
8.0.200.0000.00616.91
8.0.190.0050.00316.94
8.0.180.0050.00216.82
8.0.170.0050.00316.81
8.0.160.0000.00716.89
8.0.150.0070.00516.68
8.0.140.0090.00516.69
8.0.130.0060.00814.90
8.0.120.0070.00716.70
8.0.110.0080.00616.74
8.0.100.0100.00416.78
8.0.90.0040.00916.71
8.0.80.0110.00716.85
8.0.70.0100.00416.70
8.0.60.0100.00416.84
8.0.50.0050.00816.77
8.0.30.0100.00916.88
8.0.20.0120.00717.27
8.0.10.0100.00416.89
8.0.00.0110.00516.70
7.4.330.0060.00015.55
7.4.320.0000.00616.35
7.4.300.0030.00316.32
7.4.290.0070.00016.45
7.4.280.0070.00016.52
7.4.270.0130.00216.31
7.4.260.0090.00514.82
7.4.250.0130.00316.39
7.4.240.0080.00516.45
7.4.230.0080.00516.44
7.4.220.0140.00616.49
7.4.210.0050.00916.42
7.4.200.0070.00416.38
7.4.190.0110.00716.53
7.4.180.0090.00916.45
7.4.160.0110.00516.36
7.4.150.0120.00516.85
7.4.140.0100.01117.47
7.4.130.0130.00416.26
7.4.120.0100.01016.35
7.4.110.0120.00616.39
7.4.100.0150.00416.39
7.4.90.0080.00716.39
7.4.80.0030.01217.74
7.4.70.0110.00416.32
7.4.60.0090.00416.33
7.4.50.0100.00616.21
7.4.40.0070.00916.28
7.4.30.0120.00416.15
7.4.20.0090.00716.19
7.4.10.0090.00815.92
7.4.00.0090.00815.73
7.3.330.0120.00014.51
7.3.320.0100.00214.62
7.3.310.0100.00316.18
7.3.300.0110.00216.08
7.3.290.0080.00716.14
7.3.280.0090.00716.17
7.3.270.0130.00616.77
7.3.260.0110.01016.28
7.3.250.0100.01016.19
7.3.240.0110.00716.29
7.3.230.0080.01116.16
7.3.220.0180.00016.09
7.3.210.0130.00516.24
7.3.200.0130.00416.13
7.3.190.0150.00216.11
7.3.180.0100.00816.24
7.3.170.0090.00816.26
7.3.160.0080.00816.17
7.3.150.0110.00616.17
7.3.140.0080.00816.32
7.3.130.0100.00615.72
7.3.120.0060.01115.70
7.3.110.0090.00815.77
7.3.100.0090.00815.56
7.3.90.0090.00815.80
7.3.80.0080.00915.65
7.3.70.0070.01015.61
7.3.60.0090.00715.71
7.3.50.0100.00715.64
7.3.40.0080.00815.75
7.3.30.0100.00715.69
7.3.20.0150.00716.07
7.3.10.0200.00516.17
7.3.00.0210.00416.07
7.2.340.0180.00016.29
7.2.330.0110.00716.18
7.2.320.0100.00716.32
7.2.310.0100.00816.37
7.2.300.0100.00916.38
7.2.290.0100.00616.43
7.2.280.0100.00716.51
7.2.270.0110.00516.43
7.2.260.0080.00916.17
7.2.250.0080.00915.87
7.2.240.0070.00915.87
7.2.230.0080.01015.83
7.2.220.0100.00715.79
7.2.210.0070.01215.86
7.2.200.0090.00715.91
7.2.190.0090.00615.90
7.2.180.0080.00815.89
7.2.170.0120.00615.99
7.2.160.0090.00815.85
7.2.150.0170.00616.29
7.2.140.0180.00716.21
7.2.130.0200.00716.28
7.2.120.0420.00916.33
7.2.110.0180.01016.34
7.2.100.0230.00416.32
7.2.90.0180.00716.25
7.2.80.0180.00816.32
7.2.70.0150.00816.32
7.2.60.0180.00716.37
7.2.50.0180.00716.30
7.2.40.0160.00816.28
7.2.30.0160.00916.35
7.2.20.0190.00616.26
7.2.10.0230.00716.27
7.2.00.0180.00716.31
7.1.330.0100.00715.27
7.1.320.0120.00715.42
7.1.310.0110.00615.32
7.1.300.0100.00615.34
7.1.290.0120.00615.34
7.1.280.0090.01115.32
7.1.270.0090.00815.40
7.1.260.0090.00715.28
7.1.250.0200.00914.93
7.1.240.0200.00615.05
7.1.230.0230.00714.97
7.1.220.0180.00714.99
7.1.210.0240.00615.00
7.1.200.0200.00515.16
7.1.190.0170.00815.00
7.1.180.0170.00715.00
7.1.170.0230.00515.02
7.1.160.0200.00615.03
7.1.150.0190.00815.08
7.1.140.0210.00615.00
7.1.130.0240.00515.02
7.1.120.0270.01015.08
7.1.110.0200.00915.05
7.1.100.0220.00715.08
7.1.90.0250.00615.07
7.1.80.0220.00715.01
7.1.70.0180.00715.18
7.1.60.0270.00817.54
7.1.50.0250.00817.57
7.1.40.0260.00917.52
7.1.30.0240.00417.44
7.1.20.0260.00917.34
7.1.10.0220.00614.95
7.1.00.0210.00815.01
7.0.330.0200.00614.72
7.0.320.0200.00814.71
7.0.310.0210.00814.74
7.0.300.0230.00814.67
7.0.290.0210.00714.64
7.0.280.0230.00614.74
7.0.270.0200.00514.78
7.0.260.0180.00814.63
7.0.250.0180.00914.74
7.0.240.0240.00614.84
7.0.230.0250.00414.71
7.0.220.0190.00814.76
7.0.210.0170.01114.83
7.0.200.0200.01014.78
7.0.190.0250.00714.74
7.0.180.0240.00814.68
7.0.170.0370.00814.75
7.0.160.0220.00914.73
7.0.150.0220.00814.62
7.0.140.0290.00814.65
7.0.130.0220.01114.64
7.0.120.0250.00814.69
7.0.110.0260.00714.64
7.0.100.0230.00914.65
7.0.90.0270.00814.67
7.0.80.0410.00614.67
7.0.70.0240.00514.61
7.0.60.0240.00714.64
7.0.50.0230.00814.71
7.0.40.0260.00814.66
7.0.30.0230.00714.71
7.0.20.0270.00814.55
7.0.10.0260.00814.68
7.0.00.0290.00714.61
5.6.400.0100.00915.37
5.6.390.0120.00915.30
5.6.380.0100.00915.11
5.6.370.0120.00815.53
5.6.360.0100.00815.54
5.6.350.0150.00215.57
5.6.340.0100.00715.53
5.6.330.0100.00715.59
5.6.320.0060.01215.63
5.6.310.0090.01015.59
5.6.300.0080.01115.63
5.6.290.0130.00615.62
5.6.280.0120.00715.56
5.6.270.0140.00515.55
5.6.260.0110.00815.62
5.6.250.0120.00615.59
5.6.240.0110.00915.62
5.6.230.0080.00915.60
5.6.220.0120.00615.58
5.6.210.0110.00915.52
5.6.200.0100.00815.61
5.6.190.0100.00815.54
5.6.180.0120.00715.60
5.6.170.0100.01015.57
5.6.160.0130.00715.51
5.6.150.0110.00915.68
5.6.140.0100.00915.43
5.6.130.0100.00715.55
5.6.120.0110.00915.63
5.6.110.0110.00815.51
5.6.100.0110.00915.49
5.6.90.0100.01115.37
5.6.80.0100.00915.33
5.6.70.0070.01215.53
5.6.60.0110.00815.42
5.6.50.0120.00615.31
5.6.40.0130.00515.36
5.6.30.0080.01115.43
5.6.20.0110.00815.42
5.6.10.0090.01015.46
5.6.00.0110.00815.43

preferences:
75.27 ms | 403 KiB | 5 Q