3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo { private $x; public function setX($x) { $this->x = $x; return $this; } public function getX() { return $this->x; } } function test() : Foo { return new Foo(); } $x = test()->setX('test'); var_dump($x->getX());

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.0130.00821.95
8.3.40.0120.00318.62
8.3.30.0110.00418.67
8.3.20.0000.00820.25
8.3.10.0000.00823.64
8.3.00.0030.00619.78
8.2.180.0220.00316.75
8.2.170.0070.00722.96
8.2.160.0070.00720.32
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0040.00421.00
8.2.120.0040.00426.35
8.2.110.0030.00622.19
8.2.100.0090.00617.91
8.2.90.0050.00319.22
8.2.80.0000.00917.97
8.2.70.0080.00017.50
8.2.60.0070.00017.88
8.2.50.0040.00418.07
8.2.40.0090.00022.31
8.2.30.0000.00720.63
8.2.20.0040.00417.65
8.2.10.0000.00718.11
8.2.00.0040.00417.98
8.1.280.0110.01125.92
8.1.270.0030.00520.21
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0000.00924.02
8.1.230.0070.00417.76
8.1.220.0000.00917.74
8.1.210.0100.00718.77
8.1.200.0090.00017.38
8.1.190.0030.00617.22
8.1.180.0060.00318.10
8.1.170.0030.00618.49
8.1.160.0000.00720.68
8.1.150.0030.00518.77
8.1.140.0040.00419.51
8.1.130.0070.00017.75
8.1.120.0030.00317.43
8.1.110.0050.00217.29
8.1.100.0040.00417.40
8.1.90.0040.00417.49
8.1.80.0000.00717.39
8.1.70.0000.00717.29
8.1.60.0060.00317.46
8.1.50.0050.00317.49
8.1.40.0000.00717.40
8.1.30.0100.00017.51
8.1.20.0040.00417.67
8.1.10.0000.00817.53
8.1.00.0030.00517.36
8.0.300.0000.00718.77
8.0.290.0040.00416.63
8.0.280.0030.00318.39
8.0.270.0030.00317.11
8.0.260.0040.00417.12
8.0.250.0070.00016.77
8.0.240.0000.00716.79
8.0.230.0090.00016.87
8.0.220.0000.00816.89
8.0.210.0030.00316.85
8.0.200.0000.00616.78
8.0.190.0060.00616.88
8.0.180.0040.00416.86
8.0.170.0000.00716.89
8.0.160.0070.00016.75
8.0.150.0000.00716.87
8.0.140.0000.00816.68
8.0.130.0060.00013.22
8.0.120.0040.00416.69
8.0.110.0000.00816.84
8.0.100.0000.00716.89
8.0.90.0070.00016.75
8.0.80.0070.01016.75
8.0.70.0050.00316.90
8.0.60.0030.00416.82
8.0.50.0040.00416.71
8.0.30.0070.01016.90
8.0.20.0120.01017.40
8.0.10.0070.00016.91
8.0.00.0100.00916.77
7.4.330.0050.00016.73
7.4.320.0030.00316.46
7.4.300.0000.00616.50
7.4.290.0030.00716.46
7.4.280.0050.00316.39
7.4.270.0030.00316.41
7.4.260.0070.00016.56
7.4.250.0040.00416.52
7.4.240.0050.00216.47
7.4.230.0000.00716.69
7.4.220.0040.01516.52
7.4.210.0070.00716.61
7.4.200.0000.00716.40
7.4.160.0100.00716.53
7.4.150.0090.00917.40
7.4.140.0110.00717.86
7.4.130.0100.00816.54
7.4.120.0110.00916.62
7.4.110.0090.00916.50
7.4.100.0100.01416.50
7.4.90.0060.01016.39
7.4.80.0150.00919.39
7.4.70.0110.01116.53
7.4.60.0050.01116.42
7.4.50.0070.00716.33
7.4.40.0080.00816.41
7.4.30.0060.01516.41
7.4.00.0070.00715.08
7.3.330.0040.00413.29
7.3.320.0030.00213.25
7.3.310.0070.00016.32
7.3.300.0060.00016.34
7.3.290.0080.01016.23
7.3.280.0080.00816.29
7.3.270.0100.00717.40
7.3.260.0120.01216.35
7.3.250.0100.00716.40
7.3.240.0070.01016.27
7.3.230.0100.00716.51
7.3.210.0130.00316.42
7.3.200.0060.01216.27
7.3.190.0100.00616.59
7.3.180.0090.01316.45
7.3.170.0110.01116.61
7.3.160.0100.01416.33
7.3.120.0100.00614.75
7.3.110.0040.01414.71
7.3.100.0090.00314.64
7.3.90.0070.00715.05
7.3.80.0070.01114.80
7.3.70.0090.00014.69
7.3.60.0060.00914.53
7.3.50.0070.00714.69
7.3.40.0070.00714.46
7.3.30.0070.00714.61
7.3.20.0070.00716.65
7.3.10.0030.00616.60
7.3.00.0080.00416.79
7.2.330.0090.01216.62
7.2.320.0140.01016.27
7.2.310.0060.01016.46
7.2.300.0100.00716.58
7.2.290.0130.01116.71
7.2.250.0120.00615.29
7.2.240.0000.01715.11
7.2.230.0040.00815.14
7.2.220.0030.01014.81
7.2.210.0030.00715.16
7.2.200.0090.00315.05
7.2.190.0120.00315.10
7.2.180.0000.01215.01
7.2.170.0060.00614.72
7.2.60.0040.01116.95
7.2.00.0030.01019.14
7.1.330.0130.00315.81
7.1.320.0070.00715.73
7.1.310.0000.00915.97
7.1.300.0000.01215.93
7.1.290.0040.01115.90
7.1.280.0040.00815.89
7.1.270.0040.01115.44
7.1.260.0100.00015.71
7.1.200.0000.01415.83
7.1.100.0000.01318.37
7.1.70.0000.00717.11
7.1.60.0040.01419.13
7.1.50.0110.01116.96
7.1.00.0100.07022.27
7.0.200.0670.00714.26
7.0.60.0070.08020.03
7.0.50.0100.08017.86
7.0.40.0070.09320.18
7.0.30.0200.05320.16
7.0.20.0270.06720.23
7.0.10.0100.08020.23
7.0.00.0100.04020.07
5.6.280.0030.07021.08
5.6.210.0070.07720.48
5.6.200.0030.05718.15
5.6.190.0030.08320.50
5.6.180.0230.06720.64
5.6.170.0370.07720.53
5.6.160.0000.04720.55
5.6.150.0030.06018.19
5.6.140.0100.08318.18
5.6.130.0100.06318.28
5.6.120.0070.05320.98
5.6.110.0200.07320.99
5.6.100.0070.04720.97
5.6.90.0100.06721.13
5.6.80.0030.08020.42
5.5.350.0100.03320.43
5.5.340.0100.06317.98
5.5.330.0070.08320.25
5.5.320.0370.06320.31
5.5.310.0230.08320.51
5.5.300.0030.05018.00
5.5.290.0070.03718.07
5.5.280.0170.06320.88
5.5.270.0000.06020.87
5.5.260.0000.04720.80
5.5.250.0030.08020.80
5.5.240.0230.05320.19

preferences:
51.19 ms | 401 KiB | 5 Q