3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $savethis; public $andthis; public $notthis; public function __construct($a, $b) { $this->savethis = $a; $this->andthis = $b; $this->notthis = microtime(true); } public function __sleep() { return ['savethis', 'andthis']; } public function __wakeup() { $this->notthis = microtime(true); } } $f = new Foo(1, 2); var_dump($f, $g = serialize($f), unserialize($g));

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)
7.4.10.0120.00614.89
7.4.00.0050.01214.84
7.3.130.0070.01014.65
7.3.120.0050.00714.68
7.3.110.0080.00814.83
7.3.100.0060.00814.71
7.3.90.0060.00514.72
7.3.80.0000.01314.97
7.3.70.0060.00814.70
7.3.60.0050.00714.80
7.3.50.0030.01014.81
7.3.40.0040.00714.74
7.3.30.0030.01014.81
7.3.20.0100.00416.71
7.3.10.0030.01016.57
7.3.00.0080.00816.50
7.2.260.0030.01314.92
7.2.250.0060.01015.05
7.2.240.0030.01315.15
7.2.230.0090.00514.96
7.2.220.0060.00914.88
7.2.210.0050.00915.21
7.2.200.0060.00915.02
7.2.190.0040.01114.99
7.2.180.0050.00814.92
7.2.170.0080.00214.92
7.2.160.0060.00614.78
7.2.150.0050.00516.80
7.2.140.0100.00316.86
7.2.130.0100.00516.76
7.2.120.0080.00516.67
7.2.110.0030.01016.84
7.2.100.0060.00516.74
7.2.90.0010.01116.97
7.2.80.0030.01116.73
7.2.70.0120.00216.76
7.2.60.0020.01016.73
7.2.50.0100.00616.64
7.2.40.0030.01116.64
7.2.30.0050.00516.72
7.2.20.0030.01016.90
7.2.10.0040.01016.58
7.2.00.0030.01116.71
7.1.330.0050.01115.80
7.1.320.0040.00415.77
7.1.310.0050.00915.79
7.1.300.0070.00715.58
7.1.290.0050.00815.78
7.1.280.0070.00315.90
7.1.270.0070.00315.87
7.1.260.0060.00615.80
7.1.250.0080.00715.73
7.1.240.0000.01416.04
7.1.230.0040.01115.99
7.1.220.0060.00915.88
7.1.210.0000.00915.71
7.1.200.0080.00815.70
7.1.190.0030.00915.78
7.1.180.0060.00615.91
7.1.170.0100.00315.55
7.1.160.0080.00015.79
7.1.150.0030.00615.77
7.1.140.0070.00715.94
7.1.130.0090.00615.86
7.1.120.0070.00715.87
7.1.110.0090.00315.68
7.1.100.0040.01016.90
7.1.90.0040.01116.92
7.1.80.0100.00416.83
7.1.70.0130.00616.40
7.1.60.0130.01025.46
7.1.50.0130.01125.20
7.1.40.0110.01125.11
7.1.30.0090.01125.04
7.1.20.0100.01225.23
7.1.10.0060.01016.21
7.1.00.0060.00716.13
7.0.330.0030.00615.27
7.0.320.0040.00415.20
7.0.310.0080.00415.18
7.0.300.0030.00615.49
7.0.290.0040.00715.45
7.0.280.0060.00715.32
7.0.270.0110.00415.43
7.0.260.0090.00315.42
7.0.250.0070.00715.46
7.0.240.0050.00916.71
7.0.230.0040.01216.79
7.0.220.0090.00816.70
7.0.210.0080.00916.00
7.0.200.0030.01216.03
7.0.190.0030.01116.05
7.0.180.0070.00815.88
7.0.170.0050.01015.67
7.0.160.0000.01615.74
7.0.150.0070.00615.83
7.0.140.0080.00415.64
7.0.130.0020.01415.95
7.0.120.0100.00315.95
7.0.110.0100.00215.92
7.0.100.0080.00515.94
7.0.90.0060.00815.88
7.0.80.0050.00815.93
7.0.70.0050.00615.91
7.0.60.0050.00815.62
7.0.50.0030.01015.94
7.0.40.0040.00715.21
7.0.30.0020.01115.25
7.0.20.0070.01115.23
7.0.10.0070.00815.21
7.0.00.0090.00515.10
5.6.400.0060.00914.25
5.6.390.0070.00414.47
5.6.380.0040.01114.25
5.6.370.0000.01614.33
5.6.360.0030.00814.36
5.6.350.0030.01014.58
5.6.340.0070.00414.32
5.6.330.0030.00714.70
5.6.320.0040.00714.44
5.6.310.0070.00314.47
5.6.300.0110.00014.52
5.6.290.0120.00614.29
5.6.280.0070.00714.28
5.6.270.0030.01014.46
5.6.260.0090.00314.43
5.6.250.0100.00714.05
5.6.240.0070.01014.21
5.6.230.0100.00714.49
5.6.220.0030.01014.55
5.6.210.0050.00814.24
5.6.200.0080.00814.25
5.6.190.0050.00514.55
5.6.180.0030.00714.72
5.6.170.0000.01314.54
5.6.160.0030.01014.29
5.6.150.0000.01114.47
5.6.140.0000.01314.14
5.6.130.0040.01214.33
5.6.120.0040.00814.62
5.6.110.0040.00814.11
5.6.100.0000.01214.50
5.6.90.0070.00714.36
5.6.80.0150.00314.12
5.6.70.0070.01114.18
5.6.60.0080.00814.17
5.6.50.0100.00714.43
5.6.40.0060.00614.33
5.6.30.0090.00314.19
5.6.20.0060.00914.22
5.6.10.0080.00314.52
5.6.00.0030.01014.13

preferences:
51.37 ms | 1141 KiB | 5 Q