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(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.60.0090.00616.75
8.3.50.0140.00622.04
8.3.40.0090.00618.98
8.3.30.0060.00918.88
8.3.20.0070.00020.13
8.3.10.0050.00323.61
8.3.00.0040.00419.38
8.2.180.0140.00418.41
8.2.170.0070.00722.96
8.2.160.0100.00320.30
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0090.00317.50
8.2.110.0060.00322.25
8.2.100.0090.00317.93
8.2.90.0030.00619.09
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0040.00417.89
8.2.50.0030.00618.07
8.2.40.0040.00419.46
8.2.30.0040.00420.54
8.2.20.0040.00417.57
8.2.10.0040.00418.06
8.2.00.0040.00417.91
8.1.280.0070.01425.92
8.1.270.0040.00423.79
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.33
8.1.230.0110.00417.65
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0040.00417.22
8.1.190.0060.00317.13
8.1.180.0040.00418.10
8.1.170.0000.00818.38
8.1.160.0000.00821.94
8.1.150.0030.00618.69
8.1.140.0000.00819.37
8.1.130.0030.00317.58
8.1.120.0000.00717.22
8.1.110.0000.01017.36
8.1.100.0000.00817.38
8.1.90.0070.00017.27
8.1.80.0040.00417.26
8.1.70.0030.00317.36
8.1.60.0030.00617.52
8.1.50.0040.00417.51
8.1.40.0040.00417.35
8.1.30.0060.00317.50
8.1.20.0080.00017.58
8.1.10.0030.00517.54
8.1.00.0040.00417.34
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0000.00718.39
8.0.270.0000.00717.20
8.0.260.0050.00317.08
8.0.250.0030.00316.87
8.0.240.0000.00716.99
8.0.230.0070.00017.06
8.0.220.0030.00316.91
8.0.210.0000.00916.79
8.0.200.0060.00016.93
8.0.190.0000.00917.01
8.0.180.0070.00016.96
8.0.170.0040.00416.90
8.0.160.0070.00016.93
8.0.150.0070.00016.75
8.0.140.0030.00516.84
8.0.130.0000.00513.41
8.0.120.0080.00016.77
8.0.110.0080.00016.86
8.0.100.0000.00716.78
8.0.90.0000.00716.82
8.0.80.0090.00616.93
8.0.70.0040.00416.75
8.0.60.0050.00516.73
8.0.50.0040.00416.90
8.0.30.0140.00617.07
8.0.20.0120.00617.40
8.0.10.0000.00816.95
8.0.00.0080.01016.81
7.4.330.0000.00515.08
7.4.320.0000.00716.41
7.4.300.0060.00016.55
7.4.290.0000.00716.49
7.4.280.0050.00316.43
7.4.270.0020.00516.44
7.4.260.0000.00716.54
7.4.250.0050.00216.27
7.4.240.0040.00416.42
7.4.230.0000.00716.44
7.4.220.0090.01316.57
7.4.210.0080.00616.45
7.4.200.0040.00416.62
7.4.160.0040.01216.57
7.4.150.0150.00417.40
7.4.140.0110.00817.86
7.4.130.0090.01516.32
7.4.120.0080.01016.54
7.4.110.0140.00316.37
7.4.100.0130.01016.49
7.4.90.0070.01016.57
7.4.80.0170.00319.39
7.4.70.0140.00316.55
7.4.60.0080.00916.45
7.4.50.0000.00816.21
7.4.40.0120.00416.38
7.4.30.0060.01616.25
7.4.00.0060.00915.17
7.3.330.0000.00513.35
7.3.320.0000.00513.34
7.3.310.0030.00316.23
7.3.300.0020.00516.36
7.3.290.0020.00516.23
7.3.280.0110.00816.39
7.3.270.0170.00317.40
7.3.260.0110.00716.36
7.3.240.0080.01116.31
7.3.230.0070.01016.45
7.3.210.0080.01316.31
7.3.200.0070.01016.38
7.3.190.0030.01316.34
7.3.180.0060.00916.46
7.3.170.0070.01116.33
7.3.160.0100.01016.45
7.2.330.0130.00716.58
7.2.320.0100.00716.61
7.2.310.0070.01116.38
7.2.300.0140.00416.19
7.2.290.0120.00916.43
7.2.60.0060.00916.60
7.2.00.0000.01219.17
7.1.200.0000.01215.59
7.1.70.0030.00917.21
7.1.60.0000.01216.86
7.1.50.0090.01216.92
7.1.00.0070.07722.48
7.0.200.0040.01116.82
7.0.100.0070.08019.93
7.0.90.0470.08019.97
7.0.80.0330.09019.96
7.0.70.0270.08719.85
7.0.60.0270.07319.91
7.0.50.0230.05320.20
7.0.40.0070.05019.96
7.0.30.0130.06320.01
7.0.20.0070.08320.08
7.0.10.0030.08720.03
7.0.00.0070.08020.03
5.6.280.0030.06020.79
5.6.250.0070.08320.70
5.6.240.0000.06020.55
5.6.230.0100.08320.60
5.6.220.0100.04720.74
5.6.210.0070.08020.70
5.6.200.0230.03321.09
5.6.190.0070.06721.02
5.6.180.0130.06721.02
5.6.170.0070.08721.14
5.6.160.0070.07721.04
5.6.150.0100.08020.97
5.6.140.0030.06021.02
5.6.130.0000.09321.12
5.6.120.0100.08321.05
5.6.110.0070.08320.96
5.6.100.0100.08021.04
5.6.90.0100.08021.11
5.6.80.0030.07320.43
5.6.70.0170.06720.43
5.6.60.0200.05720.34
5.6.50.0000.08320.42
5.6.40.0070.08320.38
5.6.30.0030.08720.43
5.6.20.0100.07020.54
5.6.10.0000.05020.37
5.6.00.0070.04020.44
5.5.380.0100.07320.58
5.5.370.0200.06020.39
5.5.360.0130.07320.38
5.5.350.0170.07720.41
5.5.340.0070.08020.81
5.5.330.0030.08020.94
5.5.320.0130.07720.87
5.5.310.0070.08720.86
5.5.300.0070.08320.80
5.5.290.0100.08020.92
5.5.280.0070.07720.79
5.5.270.0070.09020.90
5.5.260.0070.08320.63
5.5.250.0170.06720.58
5.5.240.0070.07320.28
5.5.230.0100.07320.26
5.5.220.0100.07320.26
5.5.210.0070.08320.31
5.5.200.0130.04020.09
5.5.190.0030.08720.19
5.5.180.0070.08320.15
5.5.160.0070.07720.19
5.5.150.0030.08320.27
5.5.140.0070.08020.16
5.5.130.0070.06720.25
5.5.120.0070.06720.21
5.5.110.0130.06719.99
5.5.100.0030.08720.18
5.5.90.0100.07020.13
5.5.80.0170.06320.07
5.5.70.0030.04720.01
5.5.60.0070.05019.94
5.5.50.0000.04020.14
5.5.40.0100.03720.10
5.5.30.0130.07719.89
5.5.20.0100.06020.14
5.5.10.0030.04720.07
5.5.00.0070.03720.09
5.4.450.0130.07319.43
5.4.440.0070.08019.18
5.4.430.0030.08319.20
5.4.420.0070.08719.46
5.4.410.0070.08319.43
5.4.400.0030.04319.05
5.4.390.0130.07019.14
5.4.380.0070.08018.88
5.4.370.0030.08019.11
5.4.360.0100.07319.04
5.4.350.0100.04319.04
5.4.340.0030.08018.91
5.4.320.0070.07319.19
5.4.310.0100.07319.14
5.4.300.0130.07018.88
5.4.290.0130.02719.16
5.4.280.0070.08018.88
5.4.270.0070.07719.05
5.4.260.0230.05319.09
5.4.250.0100.08018.89
5.4.240.0170.06318.95
5.4.230.0100.03719.20
5.4.220.0070.07319.18
5.4.210.0070.03319.15
5.4.200.0030.03719.02
5.4.190.0030.04019.14
5.4.180.0070.05019.02
5.4.170.0070.04019.13
5.4.160.0000.03719.01
5.4.150.0130.02719.01
5.4.140.0030.03716.51
5.4.130.0030.03316.39
5.4.120.0030.04716.53
5.4.110.0030.03716.38
5.4.100.0030.06716.49
5.4.90.0030.03016.50
5.4.80.0030.05716.53
5.4.70.0000.05016.47
5.4.60.0030.03716.47
5.4.50.0000.03716.34
5.4.40.0000.05316.54
5.4.30.0030.05716.44
5.4.20.0030.04016.37
5.4.10.0030.03716.40
5.4.00.0000.03715.86

preferences:
55.43 ms | 401 KiB | 5 Q