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) . ';'); 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.0110.00416.50
8.3.60.0090.00616.50
8.3.50.0110.00922.10
8.3.40.0120.00318.79
8.3.30.0090.00618.84
8.3.20.0050.00320.16
8.3.10.0030.00523.52
8.3.00.0050.00319.38
8.2.190.0130.00316.58
8.2.180.0140.00718.16
8.2.170.0070.00722.96
8.2.160.0140.00020.43
8.2.150.0100.00024.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0000.01017.50
8.2.110.0040.00422.21
8.2.100.0060.00618.04
8.2.90.0050.00419.21
8.2.80.0050.00317.97
8.2.70.0030.00617.75
8.2.60.0080.00018.04
8.2.50.0030.00618.07
8.2.40.0080.00019.34
8.2.30.0000.00820.55
8.2.20.0000.00817.74
8.2.10.0050.00318.11
8.2.00.0040.00418.00
8.1.280.0120.00925.92
8.1.270.0080.00023.84
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00322.59
8.1.230.0140.00017.77
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0060.00317.38
8.1.190.0060.00317.35
8.1.180.0040.00418.10
8.1.170.0030.00618.50
8.1.160.0070.00022.03
8.1.150.0040.00418.84
8.1.140.0030.00519.59
8.1.130.0030.00317.63
8.1.120.0040.00417.38
8.1.110.0030.00717.51
8.1.100.0050.00317.33
8.1.90.0040.00417.45
8.1.80.0040.00417.41
8.1.70.0050.00217.34
8.1.60.0040.00417.56
8.1.50.0000.00817.55
8.1.40.0080.00017.47
8.1.30.0040.00417.55
8.1.20.0000.00817.52
8.1.10.0000.00717.48
8.1.00.0040.00417.49
8.0.300.0000.00718.77
8.0.290.0050.00216.75
8.0.280.0030.00318.57
8.0.270.0000.00817.18
8.0.260.0000.00617.14
8.0.250.0040.00416.84
8.0.240.0070.00017.01
8.0.230.0070.00016.95
8.0.220.0040.00416.89
8.0.210.0100.00016.90
8.0.200.0000.00617.02
8.0.190.0020.00516.85
8.0.180.0000.00716.96
8.0.170.0070.00016.96
8.0.160.0040.00416.91
8.0.150.0070.00016.82
8.0.140.0030.00316.87
8.0.130.0030.00313.34
8.0.120.0080.00016.88
8.0.110.0050.00316.91
8.0.100.0030.00516.93
8.0.90.0000.00716.89
8.0.80.0070.00716.86
8.0.70.0000.00717.00
8.0.60.0040.00416.74
8.0.50.0080.00016.88
8.0.30.0120.00617.14
8.0.20.0110.00717.40
8.0.10.0000.00817.00
8.0.00.0070.00916.74
7.4.330.0000.00515.08
7.4.320.0060.00016.52
7.4.300.0030.00316.59
7.4.290.0000.00716.52
7.4.280.0070.00016.50
7.4.270.0070.00016.59
7.4.260.0040.00416.50
7.4.250.0000.00816.60
7.4.240.0020.00516.49
7.4.230.0030.00316.45
7.4.220.0200.00316.53
7.4.210.0100.00816.53
7.4.200.0080.00016.62
7.4.160.0090.00616.58
7.4.150.0090.00917.40
7.4.140.0050.01217.86
7.4.130.0140.00516.46
7.4.120.0070.01016.51
7.4.110.0090.00916.57
7.4.100.0090.00916.44
7.4.90.0090.00916.45
7.4.80.0130.01019.39
7.4.70.0110.00516.38
7.4.60.0090.01216.33
7.4.50.0000.00816.35
7.4.40.0060.01116.52
7.4.30.0070.01316.50
7.4.00.0100.00715.08
7.3.330.0000.00513.24
7.3.320.0020.00213.38
7.3.310.0030.00316.27
7.3.300.0030.00316.37
7.3.290.0070.00016.34
7.3.280.0070.01016.36
7.3.270.0070.01017.40
7.3.260.0070.01016.44
7.3.250.0070.01216.54
7.3.240.0070.01016.49
7.3.230.0070.01116.53
7.3.210.0070.01116.57
7.3.200.0120.00616.60
7.3.190.0060.00916.42
7.3.180.0090.00616.51
7.3.170.0070.01016.34
7.3.160.0040.01816.51
7.2.330.0090.00916.66
7.2.320.0120.00616.85
7.2.310.0110.00616.50
7.2.300.0150.00316.47
7.2.290.0110.00816.38
7.2.60.0100.00716.82
7.2.00.0070.01019.39
7.1.200.0060.00315.97
7.1.100.0160.00317.94
7.1.70.0030.00317.12
7.1.60.0070.01719.43
7.1.50.0040.01216.87
7.1.00.0100.06722.36
7.0.200.0820.00614.71
7.0.60.0030.07719.95
7.0.50.0030.04017.86
7.0.40.0070.08320.10
7.0.30.0230.04320.15
7.0.20.0270.07720.08
7.0.10.0070.08320.15
7.0.00.0100.06320.07
5.6.280.0030.06320.82
5.6.210.0070.06720.48
5.6.200.0070.03718.19
5.6.190.0070.08020.58
5.6.180.0370.05320.64
5.6.170.0270.03720.58
5.6.160.0000.04320.39
5.6.150.0030.08718.22
5.6.140.0170.07018.14
5.6.130.0070.04018.23
5.6.120.0070.08721.02
5.6.110.0070.08320.99
5.6.100.0030.04320.91
5.6.90.0130.05721.01
5.6.80.0000.07320.29
5.5.350.0170.04320.40
5.5.340.0100.07718.09
5.5.330.0100.07720.57
5.5.320.0230.04020.31
5.5.310.0230.04720.35
5.5.300.0030.08718.07
5.5.290.0130.08017.92
5.5.280.0200.07020.69
5.5.270.0200.06720.96
5.5.260.0100.07320.77
5.5.250.0030.08020.67
5.5.240.0030.07720.13
5.4.450.0500.06719.59
5.4.440.0530.06319.48
5.4.430.0570.05319.28
5.4.420.0730.05719.47
5.4.410.0700.06019.25
5.4.400.0630.05019.26
5.4.390.0600.05019.27
5.4.380.0530.05719.36
5.4.370.0570.05319.05
5.4.360.0670.07019.15
5.4.350.0470.05719.05
5.4.340.0530.05319.23
5.4.320.0930.07719.05
5.4.310.0630.05019.20
5.4.300.0800.03719.36
5.4.290.0500.05019.11
5.4.280.0600.05719.12
5.4.270.0700.04719.15
5.4.260.0700.04018.83
5.4.250.0630.04719.00
5.4.240.0670.04319.00
5.4.230.0570.05319.24
5.4.220.0600.05719.05
5.4.210.0870.05319.22
5.4.200.0730.04019.13
5.4.190.0630.05019.24
5.4.180.0700.04319.21
5.4.170.0600.05319.00
5.4.160.0530.06319.12
5.4.150.0600.05319.21
5.4.140.0630.04716.38
5.4.130.0670.04016.54
5.4.120.0700.04016.52
5.4.110.0670.05316.65
5.4.100.0530.05716.64
5.4.90.0500.05316.68
5.4.80.0600.04716.48
5.4.70.0770.05716.54
5.4.60.0600.05016.61
5.4.50.0530.05716.57
5.4.40.0600.04716.60
5.4.30.0570.05016.57
5.4.20.0570.05016.49
5.4.10.0570.05316.26
5.4.00.0570.05316.16

preferences:
32.72 ms | 401 KiB | 5 Q