3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TheParent { public static function build(): TheParent { return new static(); } } class Child extends TheParent {} $child = Child::build(); $parent = TheParent::build(); echo get_class($child), "\n"; echo get_class($parent), "\n";

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.130.0110.00917.56
8.4.120.0160.00420.44
8.4.110.0100.01020.61
8.4.100.0130.00817.59
8.4.90.0130.00917.86
8.4.80.0060.00217.89
8.4.70.0050.00318.01
8.4.60.0110.01117.76
8.4.50.0150.00518.08
8.4.40.0160.00317.78
8.4.30.0130.00720.46
8.4.20.0170.00320.72
8.4.10.0060.00322.41
8.3.260.0110.00616.55
8.3.250.0100.00518.80
8.3.240.0050.00416.51
8.3.230.0030.00616.45
8.3.220.0080.00517.22
8.3.210.0100.00816.64
8.3.200.0040.00516.73
8.3.190.0080.00618.42
8.3.180.0050.00816.48
8.3.170.0100.01016.29
8.3.160.0040.00418.40
8.3.150.0070.01116.94
8.3.140.0080.00017.08
8.3.130.0060.00318.29
8.3.120.0120.00318.73
8.3.110.0030.00620.94
8.3.100.0130.00316.62
8.3.90.0000.00826.77
8.3.80.0030.00619.36
8.3.70.0090.00616.58
8.3.60.0080.00616.38
8.3.50.0070.01023.59
8.3.40.0100.00319.29
8.3.30.0000.01518.72
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0080.00120.41
8.2.280.0040.00718.26
8.2.270.0090.00916.30
8.2.260.0030.01416.45
8.2.250.0080.00018.34
8.2.240.0030.00617.01
8.2.230.0090.00022.58
8.2.220.0030.00624.06
8.2.210.0040.00426.77
8.2.200.0050.00518.88
8.2.190.0150.00718.41
8.2.180.0140.00725.92
8.2.170.0120.00322.96
8.2.160.0140.00022.96
8.2.150.0070.00025.66
8.2.140.0030.00624.66
8.2.130.0000.00726.16
8.2.120.0040.00426.35
8.2.110.0100.00021.04
8.2.100.0070.00417.91
8.2.90.0040.00418.16
8.2.80.0040.00417.97
8.2.70.0090.00317.75
8.2.60.0040.00417.75
8.2.50.0050.00317.55
8.2.40.0000.00718.34
8.2.30.0070.00018.05
8.2.20.0040.00417.96
8.2.10.0040.00419.23
8.2.00.0000.00719.28
8.1.330.0130.00618.29
8.1.320.0090.00916.27
8.1.310.0120.00316.55
8.1.300.0030.00618.35
8.1.290.0090.00330.84
8.1.280.0150.00325.92
8.1.270.0050.00323.99
8.1.260.0070.00028.09
8.1.250.0030.00528.09
8.1.240.0000.00822.41
8.1.230.0060.00620.97
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0040.00417.23
8.1.190.0070.00417.22
8.1.180.0040.00418.10
8.1.170.0060.00317.62
8.1.160.0000.00718.88
8.1.150.0040.00418.68
8.1.140.0040.00418.69
8.1.130.0080.00020.06
8.1.120.0070.00017.28
8.1.110.0040.00417.43
8.1.100.0000.00817.38
8.1.90.0040.00417.34
8.1.80.0070.00017.46
8.1.70.0040.00417.38
8.1.60.0000.00817.58
8.1.50.0030.00517.54
8.1.40.0000.00817.45
8.1.30.0030.00517.65
8.1.20.0030.00617.60
8.1.10.0050.00317.45
8.1.00.0000.00917.49
8.0.300.0050.00220.03
8.0.290.0040.00416.63
8.0.280.0050.00318.44
8.0.270.0040.00418.04
8.0.260.0030.00318.37
8.0.250.0040.00416.96
8.0.240.0040.00416.96
8.0.230.0030.00316.84
8.0.220.0060.00016.79
8.0.210.0000.00716.84
8.0.200.0030.00316.87
8.0.190.0000.00716.84
8.0.180.0020.00516.73
8.0.170.0000.00816.83
8.0.160.0050.00316.83
8.0.150.0040.00416.82
8.0.140.0000.00716.66
8.0.130.0050.00013.11
8.0.120.0050.00216.78
8.0.110.0000.00716.63
8.0.100.0040.00416.61
8.0.90.0040.00416.78
8.0.80.0080.00816.83
8.0.70.0070.00016.90
8.0.60.0030.00516.69
8.0.50.0000.00716.79
8.0.30.0130.01017.29
8.0.20.0260.01317.30
8.0.10.0040.00416.77
8.0.00.0140.00616.79
7.4.330.0000.00415.55
7.4.320.0000.00716.53
7.4.300.0000.00616.55
7.4.290.0050.00216.46
7.4.280.0030.00416.43
7.4.270.0000.00716.51
7.4.260.0050.00013.26
7.4.250.0070.00016.56
7.4.240.0040.00416.59
7.4.230.0030.00316.56
7.4.220.0050.00216.44
7.4.210.0080.00816.48
7.4.200.0030.00316.38
7.4.130.0080.01316.47
7.4.120.0070.01416.46
7.4.110.0130.02816.50
7.4.100.0100.00716.31
7.4.90.0120.00616.52
7.4.80.0030.01319.39
7.4.70.0080.00916.48
7.4.60.0060.01116.47
7.4.50.0070.01016.33
7.4.40.0080.00816.33
7.4.30.0030.01416.26
7.4.20.0140.00316.55
7.4.10.0120.00616.52
7.4.00.0100.00716.33
7.3.330.0000.00616.41
7.3.320.0050.00013.12
7.3.310.0030.00616.40
7.3.300.0060.00016.31
7.3.290.0100.00716.30
7.3.260.0060.01616.53
7.3.240.0110.00816.44
7.3.230.0120.00616.46
7.3.210.0040.01416.50
7.3.200.0120.00916.43
7.3.190.0090.00616.39
7.3.180.0110.00716.33
7.3.170.0070.01016.16
7.3.160.0120.00616.20
7.3.150.0140.00316.29
7.3.140.0130.00316.17
7.3.130.0100.00616.46
7.3.120.0130.00416.18
7.3.110.0130.00316.54
7.3.100.0030.01316.23
7.3.90.0100.00716.32
7.3.80.0060.01016.45
7.3.70.0150.00516.32
7.3.60.0140.00316.28
7.3.50.0000.01616.23
7.3.40.0000.02016.36
7.3.30.0080.01116.23
7.3.20.0130.00416.36
7.3.10.0170.00316.32
7.3.00.0070.01016.28
7.2.330.0070.01116.55
7.2.320.0060.01116.39
7.2.310.0000.01816.64
7.2.300.0110.00516.67
7.2.290.0030.01316.45
7.2.280.0080.00816.53
7.2.270.0060.01216.36
7.2.260.0110.00616.53
7.2.250.0080.00816.57
7.2.240.0120.00516.46
7.2.230.0090.00916.70
7.2.220.0030.01316.65
7.2.210.0070.01116.62
7.2.200.0040.01116.61
7.2.190.0000.01616.43
7.2.180.0170.00016.52
7.2.170.0060.01316.38
7.2.160.0110.00716.42
7.2.150.0080.01316.51
7.2.140.0160.00316.59
7.2.130.0030.01416.44
7.2.120.0060.01216.52
7.2.110.0030.01516.52
7.2.100.0060.01216.44
7.2.90.0090.00916.60
7.2.80.0140.00316.52
7.2.70.0390.01016.61
7.2.60.0100.01416.65
7.2.50.0090.00916.46
7.2.40.0110.00616.74
7.2.30.0090.01216.53
7.2.20.0000.02116.49
7.2.10.0100.00716.25
7.2.00.0070.01016.48

preferences:
140.95 ms | 403 KiB | 5 Q