3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); class A{ protected $stuff; function __construct(int $foo){ $this->stuff = $foo; } function getStuff(): int{ return $this->stuff; } static function __set_state($data){ return new A($data['stuff']); } } $x = new A(10); eval('$y = ' . var_export($x, true) . ';'); $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.60.0030.01216.50
8.3.50.0110.00922.11
8.3.40.0100.01018.87
8.3.30.0060.00918.75
8.3.20.0000.00720.33
8.3.10.0040.00423.49
8.3.00.0040.00419.26
8.2.180.0070.01118.52
8.2.170.0140.00022.96
8.2.160.0090.00520.39
8.2.150.0030.00724.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00617.63
8.2.110.0060.00322.12
8.2.100.0100.00318.05
8.2.90.0090.00019.10
8.2.80.0090.00017.97
8.2.70.0060.00317.47
8.2.60.0000.00817.93
8.2.50.0080.00018.07
8.2.40.0080.00019.30
8.2.30.0000.00820.50
8.2.20.0030.00517.75
8.2.10.0080.00018.07
8.2.00.0000.00718.10
8.1.280.0080.00825.92
8.1.270.0030.00523.97
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.54
8.1.230.0040.01117.78
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0030.00617.38
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0040.00418.65
8.1.160.0040.00422.02
8.1.150.0000.00818.90
8.1.140.0030.00619.51
8.1.130.0000.00717.70
8.1.120.0040.00317.48
8.1.110.0060.00317.51
8.1.100.0040.00417.45
8.1.90.0000.00817.43
8.1.80.0000.00717.47
8.1.70.0030.00317.37
8.1.60.0000.00817.47
8.1.50.0040.00417.42
8.1.40.0040.00417.50
8.1.30.0050.00317.69
8.1.20.0000.00817.64
8.1.10.0060.00317.49
8.1.00.0050.00317.42
8.0.300.0050.00318.77
8.0.290.0030.00616.63
8.0.280.0030.00318.44
8.0.270.0050.00317.18
8.0.260.0030.00317.26
8.0.250.0060.00316.94
8.0.240.0040.00416.89
8.0.230.0040.00417.01
8.0.220.0030.00416.79
8.0.210.0060.00316.89
8.0.200.0030.00316.96
8.0.190.0040.00416.95
8.0.180.0070.00016.95
8.0.170.0040.00416.85
8.0.160.0070.00016.92
8.0.150.0040.00416.83
8.0.140.0000.00716.84
8.0.130.0000.00613.30
8.0.120.0000.00816.87
8.0.110.0000.00716.73
8.0.100.0050.00216.77
8.0.90.0040.00416.78
8.0.80.0030.01316.92
8.0.70.0050.00216.72
8.0.60.0040.00416.81
8.0.50.0080.00016.77
8.0.30.0130.00617.13
8.0.20.0110.00717.40
8.0.10.0040.00416.91
8.0.00.0100.00816.83
7.4.330.0000.00515.08
7.4.320.0030.00316.60
7.4.300.0000.00716.62
7.4.290.0030.00316.62
7.4.280.0080.00016.46
7.4.270.0070.00016.58
7.4.260.0030.00316.48
7.4.250.0050.00316.55
7.4.240.0050.00216.43
7.4.230.0040.00416.60
7.4.220.0110.00716.46
7.4.210.0130.00316.57
7.4.200.0000.00716.71
7.4.160.0060.00916.48
7.4.150.0070.01117.40
7.4.140.0080.01017.86
7.4.130.0110.00916.67
7.4.120.0110.00916.55
7.4.110.0110.01116.55
7.4.100.0210.00316.45
7.4.90.0100.00616.48
7.4.80.0120.01219.39
7.4.70.0090.01316.55
7.4.60.0070.01016.53
7.4.50.0030.00516.45
7.4.40.0080.00816.37
7.4.30.0130.01016.56
7.4.00.0050.01315.03
7.3.330.0050.00013.32
7.3.320.0000.00513.38
7.3.310.0030.00316.46
7.3.300.0030.00316.28
7.3.290.0000.00716.32
7.3.280.0030.01316.36
7.3.270.0130.00717.40
7.3.260.0120.01216.63
7.3.240.0080.01116.34
7.3.230.0180.00016.53
7.3.210.0100.00816.19
7.3.200.0090.00916.32
7.3.190.0100.00616.45
7.3.180.0090.00616.38
7.3.170.0130.00916.43
7.3.160.0090.00616.27
7.3.120.0140.00714.50
7.3.110.0120.00614.98
7.3.100.0040.00714.81
7.3.90.0040.01114.82
7.3.80.0000.01414.84
7.3.70.0060.01214.54
7.3.60.0070.00714.94
7.3.50.0040.01115.06
7.3.40.0110.00314.70
7.3.30.0100.00714.52
7.3.20.0000.01116.77
7.3.10.0070.00716.82
7.3.00.0090.00616.67
7.2.330.0070.01416.68
7.2.320.0180.00616.51
7.2.310.0060.01216.76
7.2.300.0120.00816.63
7.2.290.0100.01016.82
7.2.250.0110.01115.11
7.2.240.0070.01715.15
7.2.230.0100.00315.09
7.2.220.0070.01015.04
7.2.210.0100.00715.18
7.2.200.0000.01115.29
7.2.190.0060.00315.14
7.2.180.0030.01014.95
7.2.170.0030.00714.82
7.2.60.0060.00616.76
7.2.00.0030.01019.66
7.1.330.0000.01415.80
7.1.320.0040.00815.95
7.1.310.0100.00615.85
7.1.300.0040.00715.74
7.1.290.0120.00315.87
7.1.280.0050.00515.92
7.1.270.0080.00015.84
7.1.260.0070.01015.96
7.1.200.0040.01215.69
7.1.70.0000.00717.13
7.1.60.0050.00517.34
7.1.50.0090.01217.00
7.1.00.0030.07722.41
7.0.200.0090.00616.87
7.0.60.0070.08719.95
7.0.50.0000.04317.98
7.0.40.0000.05020.05
7.0.30.0130.04720.23
7.0.20.0270.07720.06
7.0.10.0030.08720.24
7.0.00.0100.07020.23
5.6.280.0030.06021.13
5.6.210.0130.07020.68
5.6.200.0070.08018.25
5.6.190.0030.08720.61
5.6.180.0470.06320.52
5.6.170.0230.07020.52
5.6.160.0070.03720.39
5.6.150.0100.07318.19
5.6.140.0070.08718.15
5.6.130.0130.07018.29
5.6.120.0100.08020.97
5.6.110.0100.08321.11
5.6.100.0000.04721.08
5.6.90.0070.07020.98
5.6.80.0100.05320.39
5.5.350.0200.04020.44
5.5.340.0200.06018.07
5.5.330.0030.06720.26
5.5.320.0300.07320.42
5.5.310.0270.06320.23
5.5.300.0230.06017.92
5.5.290.0070.08317.98
5.5.280.0070.08020.88
5.5.270.0070.08320.80
5.5.260.0070.04020.65
5.5.250.0130.07720.50
5.5.240.0070.07720.36
5.4.450.0630.05019.63
5.4.440.0530.05319.54
5.4.430.0670.05319.33
5.4.420.0570.05319.55
5.4.410.0570.06019.47
5.4.400.0530.05718.85
5.4.390.0500.05719.30
5.4.380.0470.05719.25
5.4.370.0630.04019.14
5.4.360.0600.04719.36
5.4.350.0700.04319.14
5.4.340.0530.06018.87
5.4.320.0570.05019.22
5.4.310.0770.05719.22
5.4.300.0500.05719.23
5.4.290.0600.04318.86
5.4.280.0470.06019.36
5.4.270.0530.05019.14
5.4.260.0600.04019.11
5.4.250.0570.04718.86
5.4.240.0530.04719.08
5.4.230.0430.06019.13
5.4.220.0470.06019.35
5.4.210.0600.05019.35
5.4.200.0570.05319.14
5.4.190.0430.06019.21
5.4.180.0730.03719.14
5.4.170.0500.06719.25
5.4.160.0570.04319.12
5.4.150.0570.05019.08
5.4.140.0500.05016.61
5.4.130.0700.05316.34
5.4.120.0530.05016.59
5.4.110.0570.06016.64
5.4.100.0570.05316.32
5.4.90.0600.05016.66
5.4.80.0530.05316.64
5.4.70.0600.06016.66
5.4.60.0600.04716.25
5.4.50.0630.06016.61
5.4.40.0800.04016.50
5.4.30.0530.04716.56
5.4.20.0630.04716.58
5.4.10.0630.06716.48
5.4.00.0570.05315.78

preferences:
59.17 ms | 401 KiB | 5 Q