3v4l.org

run code in 500+ PHP versions simultaneously
<?php //class Foo class Foo implements \Serializable { public $a = 'lorem'; public function __wakeup() { fprintf(STDOUT, "in %s\n", __METHOD__); } public function serialize() { fprintf(STDOUT, "in %s\n", __METHOD__); return serialize([ $this->a, ]); } public function unserialize($serialized) { fprintf(STDOUT, "in %s\n", __METHOD__); list( $this->a, ) = unserialize($serialized); } } //$foo = new Foo(); //var_dump(serialize($foo)); //exit; $serialised = 'O:3:"Foo":1:{s:1:"a";s:5:"lorem";}'; //$serialised = 'C:3:"Foo":22:{a:1:{i:0;s:5:"lorem";}}'; $foo = unserialize($serialised); var_dump($foo);

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.5.30.0100.00819.07
8.5.20.0080.00919.73
8.5.10.0140.00516.94
8.5.00.0130.01321.77
8.4.180.0130.01019.61
8.4.170.0090.01123.77
8.4.160.0180.00622.98
8.4.150.0090.00516.82
8.4.140.0160.00517.56
8.4.130.0130.00917.76
8.4.120.0120.00722.09
8.4.110.0090.00724.01
8.4.100.0120.00817.78
8.4.90.0120.00922.51
8.4.80.0060.00419.75
8.4.70.0050.00417.95
8.4.60.0140.00718.54
8.4.50.0060.00318.69
8.4.40.0100.01017.61
8.4.30.0160.00317.95
8.4.20.0180.00319.50
8.4.10.0040.00418.79
8.3.300.0050.00520.82
8.3.290.0140.00620.81
8.3.280.0140.00618.60
8.3.270.0140.00616.60
8.3.260.0120.00716.71
8.3.250.0050.00420.71
8.3.240.0090.01016.47
8.3.230.0080.00416.84
8.3.220.0130.00518.80
8.3.210.0070.00016.65
8.3.200.0070.00216.69
8.3.190.0120.00618.94
8.3.180.0060.00817.03
8.3.170.0140.00320.84
8.3.160.0070.01118.33
8.3.150.0160.00317.21
8.3.140.0060.00316.57
8.3.130.0040.00418.52
8.3.120.0080.00020.77
8.3.110.0080.00020.94
8.3.100.0090.00024.06
8.3.90.0000.00826.77
8.3.80.0060.00318.30
8.3.70.0150.00018.31
8.3.60.0160.00016.47
8.3.50.0120.00918.09
8.3.40.0150.00418.52
8.3.30.0150.00018.62
8.3.20.0040.00421.94
8.3.10.0040.00421.64
8.3.00.0040.00419.68
8.2.300.0120.00918.37
8.2.290.0120.00620.36
8.2.280.0070.01216.95
8.2.270.0120.00617.29
8.2.260.0110.00716.61
8.2.250.0000.00816.79
8.2.240.0030.01317.18
8.2.230.0040.00422.58
8.2.220.0000.00937.54
8.2.210.0030.00526.77
8.2.200.0030.00617.00
8.2.190.0140.00416.63
8.2.180.0090.00618.54
8.2.170.0070.00722.96
8.2.160.0140.00020.24
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0040.00421.13
8.2.110.0080.00321.11
8.2.100.0080.00317.78
8.2.90.0030.00518.03
8.2.80.0000.00817.97
8.2.70.0040.00417.88
8.2.60.0030.00618.04
8.2.50.0000.00718.10
8.2.40.0030.00520.32
8.2.30.0000.00819.39
8.2.20.0040.00417.99
8.2.10.0030.00518.14
8.2.00.0030.00518.07
8.1.340.0150.00819.51
8.1.330.0150.00521.73
8.1.320.0120.00716.28
8.1.310.0040.00415.96
8.1.300.0060.00317.80
8.1.290.0100.00030.84
8.1.280.0030.01225.92
8.1.270.0000.00822.04
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0140.00020.85
8.1.220.0090.00017.76
8.1.210.0000.00818.77
8.1.200.0080.00417.35
8.1.190.0030.00617.35
8.1.180.0100.00018.10
8.1.170.0000.00818.96
8.1.160.0040.00418.89
8.1.150.0040.00419.03
8.1.140.0000.00817.61
8.1.130.0000.00719.05
8.1.120.0040.00417.51
8.1.110.0040.00417.50
8.1.100.0040.00417.37
8.1.90.0050.00317.43
8.1.80.0000.00717.52
8.1.70.0000.00817.48
8.1.60.0000.00917.60
8.1.50.0070.00317.41
8.1.40.0000.00717.41
8.1.30.0040.00417.70
8.1.20.0040.00417.72
8.1.10.0030.00517.35
8.1.00.0040.00417.34
8.0.300.0040.00419.69
8.0.290.0000.00816.88
8.0.280.0000.00718.45
8.0.270.0040.00416.80
8.0.260.0030.00319.05
8.0.250.0000.00716.98
8.0.240.0000.00817.04
8.0.230.0030.00317.03
8.0.220.0030.00716.99
8.0.210.0070.00016.86
8.0.200.0030.00316.99
8.0.190.0040.00416.97
8.0.180.0120.00016.84
8.0.170.0050.00416.92
8.0.160.0070.00017.09
8.0.150.0000.00916.82
8.0.140.0050.00216.84
8.0.130.0050.00013.36
8.0.120.0040.00416.94
8.0.110.0040.00416.98
8.0.100.0070.00016.99
8.0.90.0000.00716.82
8.0.80.0140.00416.95
8.0.70.0050.00316.95
8.0.60.0000.00716.98
8.0.50.0020.00516.84
8.0.30.0100.01017.01
8.0.20.0090.01017.40
8.0.10.0080.00016.98
8.0.00.0080.01016.71
7.4.330.0000.00415.55
7.4.320.0000.00616.46
7.4.300.0030.00316.53
7.4.290.0030.00616.53
7.4.280.0000.00816.66
7.4.270.0040.00416.53
7.4.260.0050.00316.49
7.4.250.0000.00716.50
7.4.240.0080.00016.51
7.4.230.0000.00716.73
7.4.220.0080.00016.62
7.4.210.0060.00916.51
7.4.200.0040.00416.62
7.4.160.0100.00816.48
7.4.140.0140.00717.86
7.4.130.0140.00316.58
7.4.120.0100.01016.47
7.4.110.0090.00916.33
7.4.100.0070.01016.50
7.4.90.0110.00716.55
7.4.80.0110.00819.39
7.4.70.0100.00716.48
7.4.60.0030.01416.53
7.4.50.0090.00616.63
7.4.40.0080.00816.52
7.4.00.0070.01014.89
7.3.330.0000.00513.26
7.3.320.0030.00313.12
7.3.310.0030.00316.14
7.3.300.0040.00416.03
7.3.290.0000.00716.30
7.3.280.0120.00516.24
7.3.260.0080.01216.32
7.3.240.0100.00716.30
7.3.230.0090.00916.40
7.3.210.0070.01016.16
7.3.200.0100.00616.62
7.3.190.0100.01316.34
7.3.180.0030.01316.23
7.3.170.0060.01116.30
7.3.160.0120.00416.43
7.2.330.0120.01216.32
7.2.320.0100.01016.67
7.2.310.0080.00816.59
7.2.300.0140.00616.35
7.2.290.0100.01316.43
7.2.80.0140.00016.80
7.2.60.0130.00016.88
7.2.50.0150.01216.54
7.2.40.0780.00817.68
7.2.30.0660.01417.81
7.2.20.0970.01217.89
7.2.10.0650.00918.00
7.2.00.1000.01517.84
7.1.200.0060.00715.83
7.1.160.0980.01316.70
7.1.150.0880.01316.95
7.1.140.0690.01016.90
7.1.130.0580.01516.97
7.1.120.0890.01116.61
7.1.110.0860.00716.24
7.1.100.0960.01416.05
7.1.90.0800.01015.84
7.1.80.0840.00816.08
7.1.70.0890.01115.00
7.1.60.1080.01733.30
7.1.50.1400.02032.74
7.1.40.1180.01432.46
7.1.30.1270.02032.61
7.1.20.1380.02732.77
7.1.10.1150.01514.65
7.1.00.0850.01315.04

preferences:
98.03 ms | 1459 KiB | 5 Q