3v4l.org

run code in 300+ PHP versions simultaneously
<?php class class2{} class class1{ public function __construct() { ; } function get_class_2_object() :class2{ return new class2; } } $a = new class1; $b = $a->get_class_2_object(); var_dump($b); ?>

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.00018.43
8.3.50.0090.00918.27
8.3.40.0060.00818.73
8.3.30.0110.00418.72
8.3.20.0050.00320.07
8.3.10.0070.00023.48
8.3.00.0080.00023.48
8.2.180.0110.00716.63
8.2.170.0140.00018.91
8.2.160.0080.00522.96
8.2.150.0070.00025.66
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0020.00520.82
8.2.110.0040.00722.25
8.2.100.0080.00417.78
8.2.90.0080.00019.28
8.2.80.0080.00018.02
8.2.70.0070.00417.50
8.2.60.0040.00417.93
8.2.50.0070.00018.10
8.2.40.0000.00920.61
8.2.30.0050.00319.16
8.2.20.0040.00418.00
8.2.10.0050.00317.95
8.2.00.0040.00418.08
8.1.280.0100.00725.92
8.1.270.0040.00422.24
8.1.260.0040.01226.35
8.1.250.0080.00028.09
8.1.240.0040.00424.02
8.1.230.0080.00419.48
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0090.00017.13
8.1.190.0000.00817.13
8.1.180.0030.00620.20
8.1.170.0000.00818.71
8.1.160.0040.00418.76
8.1.150.0020.00519.98
8.1.140.0000.00819.07
8.1.130.0030.00320.79
8.1.120.0040.00417.29
8.1.110.0060.00317.33
8.1.100.0040.00417.36
8.1.90.0040.00417.44
8.1.80.0040.00417.43
8.1.70.0030.00317.39
8.1.60.0000.00817.54
8.1.50.0000.00817.37
8.1.40.0030.00617.53
8.1.30.0000.00717.66
8.1.20.0040.00417.64
8.1.10.0000.00917.53
8.1.00.0040.00417.32
8.0.300.0000.00818.77
8.0.290.0070.00016.63
8.0.280.0080.00018.24
8.0.270.0000.00717.19
8.0.260.0040.00718.38
8.0.250.0000.00716.76
8.0.240.0030.00316.75
8.0.230.0070.00016.90
8.0.220.0030.00316.72
8.0.210.0050.00316.82
8.0.200.0050.00216.76
8.0.190.0030.00616.81
8.0.180.0040.00416.74
8.0.170.0040.00416.86
8.0.160.0030.00716.88
8.0.150.0000.00716.78
8.0.140.0040.00716.66
8.0.130.0000.00613.29
8.0.120.0040.00416.61
8.0.110.0040.00416.85
8.0.100.0000.00716.64
8.0.90.0030.00316.68
8.0.80.0110.00816.79
8.0.70.0040.00416.67
8.0.60.0040.00416.73
8.0.50.0000.00716.77
8.0.30.0090.00717.09
8.0.20.0100.01017.40
8.0.10.0000.00716.93
8.0.00.0030.01516.88
7.4.330.0000.00415.55
7.4.320.0000.00616.54
7.4.300.0000.00616.43
7.4.290.0030.00516.58
7.4.280.0050.00216.50
7.4.270.0030.00316.58
7.4.260.0030.00316.62
7.4.250.0040.00416.60
7.4.240.0000.00716.52
7.4.230.0030.00616.60
7.4.220.0130.00316.58
7.4.210.0030.01716.66
7.4.200.0030.00316.57
7.4.160.0100.00716.40
7.4.150.0080.00917.40
7.4.140.0090.00917.86
7.4.130.0110.00816.55
7.4.120.0090.00916.52
7.4.110.0100.01016.50
7.4.100.0090.01016.41
7.4.90.0150.00316.23
7.4.80.0120.01219.39
7.4.70.0040.01416.52
7.4.60.0100.01016.42
7.4.50.0110.00316.32
7.4.40.0070.01616.50
7.4.30.0060.00916.32
7.4.10.0100.01014.82
7.4.00.0100.00415.00
7.3.330.0050.00013.18
7.3.320.0030.00313.19
7.3.310.0030.00316.29
7.3.300.0040.00416.18
7.3.290.0020.01616.22
7.3.280.0080.01116.21
7.3.270.0180.00317.40
7.3.260.0110.01016.34
7.3.250.0100.00816.36
7.3.240.0080.00916.39
7.3.230.0090.00916.20
7.3.210.0060.01216.18
7.3.200.0130.01016.40
7.3.190.0100.00616.41
7.3.180.0060.01116.45
7.3.170.0160.00616.18
7.3.160.0110.00416.18
7.3.130.0100.01014.48
7.3.120.0060.01214.93
7.3.110.0070.01014.38
7.3.100.0060.00614.72
7.3.90.0090.00614.59
7.3.80.0090.00314.68
7.3.70.0030.00714.48
7.3.60.0060.00914.47
7.3.50.0060.01014.64
7.3.40.0060.00314.51
7.3.30.0060.00914.51
7.3.20.0070.01116.41
7.3.10.0030.01216.67
7.3.00.0140.00316.17
7.2.330.0150.00916.66
7.2.320.0120.00616.54
7.2.310.0040.01616.40
7.2.300.0150.00316.66
7.2.290.0120.00816.73
7.2.260.0170.00314.95
7.2.250.0020.01514.76
7.2.240.0120.00314.80
7.2.230.0030.01214.83
7.2.220.0070.00714.78
7.2.210.0050.00514.89
7.2.200.0030.01015.07
7.2.190.0030.01414.90
7.2.180.0000.01014.61
7.2.170.0070.00414.88
7.2.160.0000.01514.85
7.2.150.0000.01416.54
7.2.140.0140.00316.62
7.2.130.0080.00816.77
7.2.120.0040.01516.46
7.2.110.0030.01017.00
7.2.100.0030.01016.57
7.2.90.0030.01316.84
7.2.80.0030.01316.77
7.2.70.0100.00316.72
7.2.60.0090.00316.91
7.2.50.0070.00716.80
7.2.40.0000.01016.58
7.2.30.0030.01316.76
7.2.20.0060.00616.88
7.2.10.0030.00916.54
7.2.00.0030.01216.73
7.1.330.0030.01315.77
7.1.320.0050.00515.79
7.1.310.0030.01015.83
7.1.300.0000.01415.78
7.1.290.0040.00415.54
7.1.280.0030.01015.68
7.1.270.0030.01215.73
7.1.260.0140.00415.76
7.1.250.0080.00315.80
7.1.240.0030.01315.67
7.1.230.0060.01015.91
7.1.220.0090.00415.58
7.1.210.0090.00615.82
7.1.200.0100.00315.78
7.1.190.0070.00715.89
7.1.180.0000.01215.59
7.1.170.0060.00615.93
7.1.160.0040.01115.48
7.1.150.0070.00715.43
7.1.140.0100.00315.73
7.1.130.0050.00515.82
7.1.120.0240.01016.25
7.1.110.0260.00516.03
7.1.100.0230.01115.96
7.1.90.0200.01116.05
7.1.80.0220.00516.12
7.1.70.0200.01015.36
7.1.60.0290.01024.47
7.1.50.0230.01524.23
7.1.40.0230.01124.22
7.1.30.0280.01024.20
7.1.20.0280.00824.22
7.1.10.0210.01115.12
7.1.00.0240.01415.30
7.0.330.0030.00615.36
7.0.320.0060.00615.36
7.0.310.0030.00715.55
7.0.300.0030.01315.33
7.0.290.0060.01015.33
7.0.280.0040.00715.52
7.0.270.0080.00015.46
7.0.260.0090.00315.48
7.0.250.0140.01015.67
7.0.240.0220.01215.83
7.0.230.0200.01015.59
7.0.220.0240.00315.59
7.0.210.0190.01015.07
7.0.200.0280.00915.19
7.0.190.0270.00715.10
7.0.180.0280.00514.73
7.0.170.0300.00914.79
7.0.160.0280.00314.93
7.0.150.0230.00914.71
7.0.140.0230.00814.83
7.0.130.0200.01015.11
7.0.120.0370.00514.87
7.0.110.0220.01014.88
7.0.100.0180.00815.00
7.0.90.0160.01514.89
7.0.80.0210.00515.01
7.0.70.0180.01015.02
7.0.60.0190.01014.72
7.0.50.0560.00814.94
7.0.40.0200.01114.17
7.0.30.0220.00913.74
7.0.20.0230.00913.92
7.0.10.0240.00814.07
7.0.00.0210.01013.90
5.6.400.0120.00614.24
5.6.390.0030.00914.52
5.6.380.0040.00414.23
5.6.370.0000.01514.29
5.6.360.0070.00713.97
5.6.350.0040.01114.02
5.6.340.0030.01214.17
5.6.330.0030.01013.99
5.6.320.0100.00014.28
5.6.310.0090.00614.12
5.6.300.0040.01214.02
5.6.290.0060.00314.32
5.6.280.0040.00814.19
5.6.270.0070.00713.94
5.6.260.0030.01014.27
5.6.250.0070.00713.97
5.6.240.0030.01014.41
5.6.230.0070.00314.23
5.6.220.0100.00314.36
5.6.210.0000.01314.09
5.6.200.0030.00614.37
5.6.190.0040.00814.03
5.6.180.0090.00714.33
5.6.170.0040.01214.21
5.6.160.0070.00414.24
5.6.150.0090.00014.02
5.6.140.0070.00714.34
5.6.130.0070.00713.97
5.6.120.0070.00713.89
5.6.110.0000.00914.36
5.6.100.0040.00414.01
5.6.90.0040.00413.96
5.6.80.0000.01414.18
5.6.70.0060.00614.07
5.6.60.0100.00313.89
5.6.50.0110.00314.36
5.6.40.0120.00013.90
5.6.30.0000.01114.06
5.6.20.0120.00313.93
5.6.10.0040.01414.14
5.6.00.0060.01014.07

preferences:
71.02 ms | 400 KiB | 5 Q