3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); class A{ protected $stuff; function __construct(float $foo){ $this->stuff = $foo; } function getStuff(): float{ return $this->stuff; } static function __set_state($data){ return new A($data['stuff']); } } $x = new A(0.0); eval('$y = ' . var_export($x, true) . ';'); var_dump($y->getStuff());

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.70.0090.00616.50
8.3.60.0110.00316.63
8.3.50.0090.00922.12
8.3.40.0070.00718.83
8.3.30.0090.00618.71
8.3.20.0040.00420.20
8.3.10.0040.00423.52
8.3.00.0080.00019.26
8.2.190.0130.00716.75
8.2.180.0120.00618.17
8.2.170.0070.01422.96
8.2.160.0070.00720.57
8.2.150.0100.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0090.00017.50
8.2.110.0170.00322.27
8.2.100.0050.00518.05
8.2.90.0030.00619.19
8.2.80.0030.00517.97
8.2.70.0080.00017.50
8.2.60.0040.00418.16
8.2.50.0050.00418.07
8.2.40.0070.00019.41
8.2.30.0040.00420.53
8.2.20.0040.00417.83
8.2.10.0000.00818.14
8.2.00.0000.00718.13
8.1.280.0110.00425.92
8.1.270.0040.00423.92
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0060.00322.54
8.1.230.0130.00317.76
8.1.220.0000.00817.88
8.1.210.0050.00318.77
8.1.200.0030.00617.34
8.1.190.0040.00417.35
8.1.180.0000.00718.10
8.1.170.0080.00018.44
8.1.160.0040.00421.94
8.1.150.0070.00018.95
8.1.140.0040.00419.55
8.1.130.0000.00717.68
8.1.120.0040.00417.55
8.1.110.0100.00017.38
8.1.100.0000.00817.39
8.1.90.0030.00617.41
8.1.80.0000.00717.35
8.1.70.0030.00317.48
8.1.60.0040.00417.61
8.1.50.0050.00317.57
8.1.40.0060.00317.42
8.1.30.0040.00417.58
8.1.20.0070.00017.62
8.1.10.0050.00317.50
8.1.00.0080.00017.53
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0000.00718.39
8.0.270.0040.00417.14
8.0.260.0030.00317.19
8.0.250.0070.00016.95
8.0.240.0000.00716.84
8.0.230.0000.00716.99
8.0.220.0000.00816.93
8.0.210.0040.00416.78
8.0.200.0030.00316.85
8.0.190.0030.00516.94
8.0.180.0040.00417.02
8.0.170.0040.00416.79
8.0.160.0040.00316.88
8.0.150.0030.00516.75
8.0.140.0050.00316.85
8.0.130.0030.00313.32
8.0.120.0040.00416.89
8.0.110.0040.00416.89
8.0.100.0000.00816.80
8.0.90.0080.00016.93
8.0.80.0060.00816.86
8.0.70.0000.00816.70
8.0.60.0040.00416.76
8.0.50.0030.00516.96
8.0.30.0100.00717.01
8.0.20.0120.00617.40
8.0.10.0040.00416.98
8.0.00.0120.00516.68
7.4.330.0020.00215.13
7.4.320.0000.00616.51
7.4.300.0000.00616.51
7.4.290.0030.00316.42
7.4.280.0030.00616.38
7.4.270.0070.00016.52
7.4.260.0060.00016.55
7.4.250.0040.00416.57
7.4.240.0050.00216.63
7.4.230.0030.00316.38
7.4.220.0090.01216.41
7.4.210.0080.00716.56
7.4.200.0000.00716.43
7.4.160.0040.01116.28
7.4.150.0030.01417.40
7.4.140.0080.01317.86
7.4.130.0110.00816.60
7.4.120.0160.00416.63
7.4.110.0040.01816.38
7.4.100.0070.01116.53
7.4.90.0100.00716.47
7.4.80.0090.00919.39
7.4.70.0110.00716.38
7.4.60.0040.01416.67
7.4.50.0040.00416.14
7.4.40.0090.00616.63
7.4.30.0120.00916.48
7.4.00.0030.01114.81
7.3.330.0030.00313.16
7.3.320.0030.00313.34
7.3.310.0000.00616.21
7.3.300.0030.00316.30
7.3.290.0040.00416.21
7.3.280.0100.00916.39
7.3.270.0140.00617.40
7.3.260.0070.01416.40
7.3.250.0120.00616.51
7.3.240.0150.00716.40
7.3.230.0110.01116.39
7.3.210.0150.00316.30
7.3.200.0060.01216.29
7.3.190.0050.01116.37
7.3.180.0030.01316.23
7.3.170.0070.01016.28
7.3.160.0100.01016.61
7.3.10.0070.01016.31
7.3.00.0100.00716.38
7.2.330.0030.01316.79
7.2.320.0070.01116.56
7.2.310.0060.01916.84
7.2.300.0030.01416.60
7.2.290.0100.01316.59
7.2.130.0150.00416.63
7.2.120.0030.01316.29
7.2.110.0150.00616.70
7.2.100.0110.00716.82
7.2.90.0150.00416.27
7.2.80.0150.00616.60
7.2.70.0140.00316.70
7.2.60.0090.00916.49
7.2.50.0110.01116.59
7.2.40.0090.00916.59
7.2.30.0110.01216.39
7.2.20.0120.00816.56
7.2.10.0110.00716.66
7.2.00.0110.00717.89
7.1.250.0070.01015.39
7.1.200.0090.00315.95
7.1.100.0030.01017.85
7.1.70.0070.00017.12
7.1.60.0090.01519.43
7.1.50.0090.01216.63
7.1.00.0070.07322.35
7.0.200.0720.00014.86
7.0.60.0130.07319.91
7.0.50.0000.04717.84
7.0.40.0170.04020.05
7.0.30.0130.05320.23
7.0.20.0200.04720.23
7.0.10.0130.08020.12
7.0.00.0030.05720.33
5.6.280.0100.07021.13
5.6.210.0100.07320.68
5.6.200.0070.08018.20
5.6.190.0030.08320.68
5.6.180.0500.07320.67
5.6.170.0130.04720.45
5.6.160.0000.04320.52
5.6.150.0030.08718.16
5.6.140.0130.03318.14
5.6.130.0000.08318.29
5.6.120.0170.05721.15
5.6.110.0100.08020.96
5.6.100.0030.04320.98
5.6.90.0170.07321.11
5.6.80.0000.05320.41
5.5.350.0230.05720.41
5.5.340.0030.05318.09
5.5.330.0130.07320.42
5.5.320.0230.05720.30
5.5.310.0300.07020.19
5.5.300.0130.04317.98
5.5.290.0070.03717.98
5.5.280.0100.05020.86
5.5.270.0070.06020.77
5.5.260.0070.04320.94
5.5.250.0030.06320.62
5.5.240.0000.09320.04
5.4.450.0530.05719.30
5.4.440.0470.06719.43
5.4.430.0670.06319.16
5.4.420.0670.05019.68
5.4.410.0570.05019.45
5.4.400.0770.05019.06
5.4.390.0700.05319.25
5.4.380.0670.05319.14
5.4.370.0670.05018.87
5.4.360.0570.05319.14
5.4.350.0530.06719.25
5.4.340.0530.05319.15
5.4.320.0600.05018.97
5.4.310.0530.05319.13
5.4.300.0630.05719.02
5.4.290.0670.05318.96
5.4.280.0500.05718.96
5.4.270.0530.05018.83
5.4.260.0800.06719.15
5.4.250.0470.05719.00
5.4.240.0500.05319.25
5.4.230.0600.04719.25
5.4.220.0800.07318.84
5.4.210.0800.05319.14
5.4.200.0700.04718.86
5.4.190.0670.05019.27
5.4.180.0570.06018.96
5.4.170.0430.06319.25
5.4.160.0800.06019.22
5.4.150.0630.07719.25
5.4.140.0500.05716.56
5.4.130.0600.05316.44
5.4.120.0670.04316.76
5.4.110.0600.06016.63
5.4.100.0730.05716.47
5.4.90.0600.04716.63
5.4.80.0530.05316.23
5.4.70.0670.04316.55
5.4.60.0630.05016.48
5.4.50.0630.05316.61
5.4.40.0600.06316.42
5.4.30.0730.04316.57
5.4.20.0600.05016.60
5.4.10.0670.04716.58
5.4.00.0600.05315.87

preferences:
41.69 ms | 401 KiB | 5 Q