3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo1 { public $a; public function __construct($a) { $this->a = $a; }} class foo2 { protected $a; public function __construct($a) { $this->a = $a; }} class foo3 { private $a; public function __construct($a) { $this->a = $a; }} $foo1 = new foo1("test"); $foo2 = new foo2("test"); $foo3 = new foo3("test"); var_dump(serialize($foo1)); var_dump(serialize($foo2)); var_dump(serialize($foo3)); var_dump(unserialize('O:4:"foo1":1:{s:1:"a";s:4:"test";}')); var_dump(unserialize('O:4:"foo2":1:{s:1:"a";s:4:"test";}')); var_dump(unserialize('O:4:"foo3":1:{s:1:"a";s:4:"test";}'));

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.4.10.0130.01019.57
8.3.140.0140.00316.61
8.3.130.0060.00316.55
8.3.120.0040.01120.68
8.3.110.0040.00416.39
8.3.100.0060.01324.06
8.3.90.0080.00026.77
8.3.80.0080.00318.31
8.3.70.0090.00616.58
8.3.60.0180.00318.30
8.3.50.0180.00522.93
8.3.40.0090.00918.59
8.3.30.0140.00418.67
8.3.20.0040.00421.60
8.3.10.0040.00421.73
8.3.00.0030.00620.62
8.2.260.0150.00316.67
8.2.250.0050.00318.40
8.2.240.0040.00417.18
8.2.230.0060.00320.94
8.2.220.0080.00337.54
8.2.210.0110.00726.77
8.2.200.0070.00418.88
8.2.190.0070.01016.58
8.2.180.0110.01118.54
8.2.170.0120.00322.96
8.2.160.0040.01420.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00619.66
8.2.120.0080.00026.35
8.2.110.0060.00322.16
8.2.100.0070.00417.66
8.2.90.0030.00517.84
8.2.80.0000.00817.97
8.2.70.0040.00417.90
8.2.60.0080.00018.22
8.2.50.0040.00418.10
8.2.40.0040.00420.47
8.2.30.0050.00219.18
8.2.20.0020.00517.98
8.2.10.0070.00017.99
8.2.00.0040.00417.64
8.1.300.0050.00518.37
8.1.290.0030.00630.84
8.1.280.0120.00625.92
8.1.270.0050.00322.16
8.1.260.0090.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00622.22
8.1.230.0120.00022.66
8.1.220.0050.00517.74
8.1.210.0110.00018.77
8.1.200.0000.00917.36
8.1.190.0030.00617.00
8.1.180.0000.00818.10
8.1.170.0090.00018.54
8.1.160.0040.00418.78
8.1.150.0080.00020.16
8.1.140.0050.00219.50
8.1.130.0030.00319.11
8.1.120.0000.00717.29
8.1.110.0040.00417.28
8.1.100.0030.00617.35
8.1.90.0070.00017.45
8.1.80.0030.00317.40
8.1.70.0040.00417.41
8.1.60.0080.00017.48
8.1.50.0040.00417.57
8.1.40.0090.00017.46
8.1.30.0050.00317.63
8.1.20.0040.00417.55
8.1.10.0040.00417.37
8.1.00.0030.00617.45
8.0.300.0070.00419.68
8.0.290.0050.00216.75
8.0.280.0070.00018.44
8.0.270.0070.00016.90
8.0.260.0060.00317.13
8.0.250.0050.00217.00
8.0.240.0050.00216.82
8.0.230.0070.00016.84
8.0.220.0030.00416.93
8.0.210.0030.00316.91
8.0.200.0040.00416.79
8.0.190.0030.00616.99
8.0.180.0040.00416.79
8.0.170.0040.00416.98
8.0.160.0040.00416.86
8.0.150.0050.00216.86
8.0.140.0040.00416.77
8.0.130.0000.00713.27
8.0.120.0000.00716.83
8.0.110.0040.00416.89
8.0.100.0040.00416.75
8.0.90.0000.00716.88
8.0.80.0030.01316.96
8.0.70.0000.00716.91
8.0.60.0040.00416.92
8.0.50.0050.00316.88
8.0.30.0060.01017.18
8.0.20.0110.01017.40
8.0.10.0000.00717.04
8.0.00.0090.00916.94
7.4.330.0050.00015.55
7.4.320.0000.00616.56
7.4.300.0000.00616.56
7.4.290.0050.00316.50
7.4.280.0040.00416.39
7.4.270.0070.00016.60
7.4.260.0060.00316.54
7.4.250.0040.00416.55
7.4.240.0070.00016.49
7.4.230.0040.00416.61
7.4.220.0060.01216.51
7.4.210.0090.01216.68
7.4.200.0030.00316.70
7.4.160.0100.00516.38
7.4.150.0150.00317.40
7.4.140.0110.00717.86
7.4.130.0130.00416.54
7.4.120.0060.01116.54
7.4.110.0100.01016.59
7.4.100.0150.00416.44
7.4.90.0120.00616.48
7.4.80.0120.00619.39
7.4.70.0090.00916.25
7.4.60.0120.00416.52
7.4.50.0110.00316.29
7.4.40.0070.01316.36
7.4.30.0080.00916.74
7.4.00.0030.01514.71
7.3.330.0000.00713.21
7.3.320.0030.00213.21
7.3.310.0040.00416.14
7.3.300.0040.00416.16
7.3.290.0080.00916.27
7.3.280.0070.01116.26
7.3.270.0130.00417.40
7.3.260.0110.00616.31
7.3.250.0120.00716.34
7.3.240.0160.00416.33
7.3.230.0040.01316.43
7.3.210.0070.01016.33
7.3.200.0150.00919.39
7.3.190.0180.00416.48
7.3.180.0030.01316.34
7.3.170.0100.01016.30
7.3.160.0130.00616.41
7.3.10.0180.00016.15
7.3.00.0110.00316.50
7.2.330.0090.00916.72
7.2.320.0060.01216.41
7.2.310.0120.00616.55
7.2.300.0060.01616.71
7.2.290.0100.01416.71
7.2.130.0040.01116.41
7.2.120.0080.00516.74
7.2.110.0100.00716.24
7.2.100.0090.00316.12
7.2.90.0070.00716.20
7.2.80.0060.00916.34
7.2.70.0100.01016.15
7.2.60.0020.01116.38
7.2.50.0080.00816.67
7.2.40.0080.01116.18
7.2.30.0090.00916.88
7.2.20.0110.01416.39
7.2.10.0170.00716.24
7.2.00.0130.00916.63
7.1.250.0040.01115.07
7.1.200.0030.00915.82
7.1.70.0080.00817.09
7.1.60.0040.00717.00
7.1.10.0070.06022.26
7.1.00.0030.06322.34
7.0.200.0080.00616.72
7.0.150.0130.05321.96
7.0.140.0130.05321.85
7.0.130.0130.07321.82
7.0.120.0070.05721.82
7.0.110.0100.06021.82
7.0.100.0100.08021.91
7.0.90.0100.06021.93
7.0.80.0100.05321.91
7.0.70.0100.08321.94
7.0.60.0170.07021.98
7.0.50.0170.04721.91
7.0.40.0100.05321.85
7.0.30.0070.06721.93
7.0.20.0200.04321.87
7.0.10.0100.05321.92
7.0.00.0070.08021.89

preferences:
65.36 ms | 403 KiB | 5 Q