3v4l.org

run code in 300+ PHP versions simultaneously
<?php # base class class Test_TestClassBase { public $x = 4; public function __wakeup() { var_dump("__wakeup"); } public function __sleep() { var_dump("__sleep"); return array_keys(get_object_vars($this)); } public function unserialize($input) { var_dump("unserialize"); } public function serialize() { var_dump("serialize"); return serialize(get_object_vars($this)); } } # derived classes class Test_TestClassA extends Test_TestClassBase {} class Test_TestClassB extends Test_TestClassBase implements Serializable {} class Test_TestClassAA extends Test_TestClassA implements Serializable {} class Test_TestClassBB extends Test_TestClassB {} # run our serialisation foreach(array("Test_TestClassA", "Test_TestClassB", "Test_TestClassAA", "Test_TestClassBB") as $class) { $serialised = 'O:'.strlen($class).':"'.$class.'":1:{s:1:"x";i:4;}'; var_dump("(input) ".$serialised); var_dump("(output) ".(unserialize($serialised) instanceof $class ? "true (passing)" : "false (failing)")); }

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.00718.43
8.3.60.0040.01118.26
8.3.50.0070.00718.03
8.3.40.0150.00018.67
8.3.30.0120.00318.71
8.3.20.0030.00518.99
8.3.10.0090.00021.69
8.3.00.0080.00023.50
8.2.190.0180.00416.63
8.2.180.0150.00018.13
8.2.170.0100.00322.96
8.2.160.0090.00619.46
8.2.150.0000.00724.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0060.00320.77
8.2.110.0150.00621.03
8.2.100.0040.00817.91
8.2.90.0000.00820.55
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0060.00317.50
8.2.50.0050.00519.34
8.2.40.0080.00017.63
8.2.30.0000.00819.30
8.2.20.0030.00518.10
8.2.10.0000.00717.99
8.2.00.0050.00219.39
8.1.280.0110.01125.92
8.1.270.0080.00021.98
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0070.01019.20
8.1.230.0120.00020.88
8.1.220.0060.00317.79
8.1.210.0030.00618.88
8.1.200.0000.00817.23
8.1.190.0050.00317.48
8.1.180.0080.00018.10
8.1.170.0030.00618.54
8.1.160.0030.00518.85
8.1.150.0040.00418.96
8.1.140.0000.00817.63
8.1.130.0000.00719.02
8.1.120.0040.00417.53
8.1.110.0030.00517.48
8.1.100.0050.00217.48
8.1.90.0040.00417.51
8.1.80.0000.00717.48
8.1.70.0030.00517.48
8.1.60.0030.00617.59
8.1.50.0000.00817.57
8.1.40.0030.00617.39
8.1.30.0030.00517.55
8.1.20.0000.00817.63
8.1.10.0060.00517.52
8.1.00.0060.00317.47
8.0.300.0000.00919.91
8.0.290.0070.00016.75
8.0.280.0080.00018.41
8.0.270.0040.00417.18
8.0.260.0040.00417.19
8.0.250.0000.00716.93
8.0.240.0030.00316.92
8.0.230.0000.00716.92
8.0.220.0000.00716.96
8.0.210.0000.00716.85
8.0.200.0030.00317.00
8.0.190.0000.00716.99
8.0.180.0080.00016.99
8.0.170.0000.00817.05
8.0.160.0040.00417.00
8.0.150.0040.00417.02
8.0.140.0040.00416.88
8.0.130.0060.00013.37
8.0.120.0040.00416.89
8.0.110.0000.00716.89
8.0.100.0000.00816.76
8.0.90.0000.00717.02
8.0.80.0080.00816.96
8.0.70.0070.00016.87
8.0.60.0000.00716.94
8.0.50.0040.00416.96
8.0.30.0120.01017.08
8.0.20.0070.01317.40
8.0.10.0040.00416.94
8.0.00.0100.01216.79
7.4.330.0050.00015.55
7.4.320.0030.00316.60
7.4.300.0060.00016.59
7.4.290.0070.00016.50
7.4.280.0050.00516.63
7.4.270.0040.00416.50
7.4.260.0000.00716.53
7.4.250.0030.00316.54
7.4.240.0070.00016.61
7.4.230.0000.00716.59
7.4.220.0040.00416.61
7.4.210.0060.01216.62
7.4.200.0070.00016.72
7.4.160.0120.00716.53
7.4.140.0120.00617.86
7.4.130.0110.00716.73
7.4.120.0080.01116.57
7.4.110.0110.00616.57
7.4.100.0120.00616.52
7.4.90.0140.00416.63
7.4.80.0030.01719.39
7.4.70.0040.01416.56
7.4.60.0000.01716.36
7.4.50.0110.00716.38
7.4.40.0120.00816.64
7.4.00.0070.00814.99
7.3.330.0050.00013.44
7.3.320.0070.00013.54
7.3.310.0030.00316.49
7.3.300.0070.00016.51
7.3.290.0040.00416.39
7.3.280.0150.00616.42
7.3.260.0130.00616.62
7.3.240.0120.00516.44
7.3.230.0120.00616.54
7.3.210.0110.00816.62
7.3.200.0140.00316.81
7.3.190.0160.00316.56
7.3.180.0120.01216.78
7.3.170.0060.01016.47
7.3.160.0150.00716.57
7.3.120.0030.01314.95
7.3.110.0100.00614.85
7.3.100.0040.01515.06
7.3.90.0030.00914.96
7.3.80.0040.01114.87
7.3.70.0050.00514.69
7.3.60.0110.00414.95
7.3.50.0040.01114.80
7.3.40.0030.01014.98
7.3.30.0040.01114.81
7.3.20.0090.00616.82
7.3.10.0100.00316.68
7.3.00.0100.00316.75
7.2.330.0090.00916.41
7.2.320.0060.01516.75
7.2.310.0100.00916.50
7.2.300.0030.01416.50
7.2.290.0130.01016.28
7.2.250.0070.01015.20
7.2.240.0070.01414.87
7.2.230.0070.01114.66
7.2.220.0030.01015.12
7.2.210.0070.01014.93
7.2.200.0060.00914.83
7.2.190.0100.00714.79
7.2.180.0070.00415.04
7.2.170.0000.01114.99
7.2.80.0080.00416.71
7.2.70.0750.01014.84
7.2.60.0780.00914.79
7.2.50.0680.00915.04
7.2.40.0540.00614.65
7.2.30.0650.01014.87
7.2.20.0680.00914.82
7.2.10.0400.01215.22
7.2.00.0780.00314.89
7.1.330.0000.01315.85
7.1.320.0060.00315.53
7.1.310.0070.01015.54
7.1.300.0070.00715.84
7.1.290.0030.01015.82
7.1.280.0030.01015.74
7.1.270.0030.00915.74
7.1.260.0000.01315.54
7.1.200.0070.00715.97
7.1.170.0620.00313.93
7.1.160.0530.00614.15
7.1.150.0690.01013.91
7.1.140.0570.00613.85
7.1.130.0500.00314.04
7.1.120.0520.00314.02
7.1.110.0520.01614.02
7.1.100.0470.00714.09
7.1.90.0600.00713.98
7.1.80.0600.00613.96
7.1.70.0700.01013.99
7.1.60.0810.01632.06
7.1.50.0860.01331.65
7.1.40.0840.01032.03
7.1.30.0750.01632.08
7.1.20.0770.01631.64
7.1.10.0510.01013.79
7.1.00.0550.00313.93
7.0.300.0550.01013.75
7.0.290.0560.00613.62
7.0.270.0700.00913.44
7.0.260.0750.00413.71
7.0.250.0540.01213.38
7.0.240.0780.01013.33
7.0.230.1630.01313.53
7.0.220.0710.01013.31
7.0.210.0670.01013.44
7.0.200.0630.01313.59
7.0.190.0680.00413.70
7.0.180.0680.00013.59
7.0.170.0680.00713.64
7.0.160.0510.01613.55
7.0.150.0510.00313.61
7.0.140.0600.01113.67
7.0.130.0400.01013.78
7.0.120.1820.01013.45
7.0.110.0130.01313.67
7.0.100.0620.01013.56
7.0.90.0350.01213.34
7.0.80.0600.00713.83
7.0.70.0520.00713.50
7.0.60.0420.01813.52
7.0.50.0520.01013.71
7.0.40.0440.01513.67
7.0.30.0620.01013.32
7.0.20.0450.00913.52
7.0.10.0420.00813.74
7.0.00.0430.01313.61
5.6.300.0120.00314.12
5.6.290.0070.01814.24
5.6.280.0150.00514.44
5.6.270.0170.00914.18
5.6.260.0160.01014.20
5.6.250.0070.01714.52
5.6.240.0120.01214.47
5.6.230.0130.01314.11
5.6.220.0190.00814.34
5.6.210.0090.01714.32
5.6.200.0100.01014.43
5.6.190.0080.01214.40
5.6.180.0160.01014.18
5.6.170.0170.00414.39
5.6.160.0150.00914.32
5.6.150.0090.01214.15
5.6.140.0000.01814.09
5.6.130.0170.00414.34
5.6.120.0130.01014.32
5.6.110.0160.00914.30
5.6.100.0180.00614.39
5.6.90.0110.01114.32
5.6.80.0120.01214.23
5.6.70.0120.00814.30
5.6.60.0120.01214.14
5.6.50.0090.01314.28
5.6.40.0170.00414.13
5.6.30.0160.00614.36
5.6.20.0140.00913.99
5.6.10.0110.01114.09
5.6.00.0080.01514.16
5.5.380.0130.00710.93
5.5.370.0110.00311.31
5.5.360.0110.00811.10
5.5.350.0120.00210.89
5.5.340.0080.01110.93
5.5.330.0130.00711.21
5.5.320.0060.01011.38
5.5.310.0160.00311.09
5.5.300.0100.00711.14
5.5.290.0070.01011.10
5.5.280.0130.00611.23
5.5.270.0090.00911.01
5.5.260.0120.00611.24
5.5.250.0100.01010.80
5.5.240.0140.00511.28
5.5.230.0070.00710.99
5.5.220.0070.01111.00
5.5.210.0100.00711.00
5.5.200.0200.00010.85
5.5.190.0130.00510.92
5.5.180.0110.00711.07
5.5.160.0060.01210.92
5.5.150.0140.00310.97
5.5.140.0160.00311.23
5.5.130.0140.00711.16
5.5.120.0050.01411.24
5.5.110.0110.00711.14
5.5.100.0120.00811.09
5.5.90.0080.00510.87
5.5.80.0070.00710.96
5.5.70.0100.00311.09
5.5.60.0120.00310.95
5.5.50.0120.00810.82
5.5.40.0110.00510.97
5.5.30.0060.01311.12
5.5.20.0040.01511.09
5.5.10.0140.00311.13
5.5.00.0140.00510.75
5.4.450.0120.00611.00
5.4.440.0110.00611.12
5.4.430.0060.01210.86
5.4.420.0140.00310.77
5.4.410.0090.00911.18
5.4.400.0110.00711.28
5.4.390.0120.00411.19
5.4.380.0100.00511.21
5.4.370.0080.00911.11
5.4.360.0140.00411.06
5.4.350.0110.00511.18
5.4.340.0140.00011.05
5.4.320.0120.00410.93
5.4.310.0110.00811.20
5.4.300.0130.00510.97
5.4.290.0120.00610.98
5.4.280.0170.00011.04
5.4.270.0100.00510.78
5.4.260.0140.00610.99
5.4.250.0100.00310.95
5.4.240.0160.00310.94
5.4.230.0080.00810.89
5.4.220.0110.00610.97
5.4.210.0110.00511.01
5.4.200.0190.00011.01
5.4.190.0120.00311.13
5.4.180.0120.00610.73
5.4.170.0080.01211.01
5.4.160.0060.01210.83
5.4.150.0110.00510.75
5.4.140.0120.00611.02
5.4.130.0040.01210.84
5.4.120.0070.00711.04
5.4.110.0090.00611.16
5.4.100.0050.01411.00
5.4.90.0070.01111.01
5.4.80.0060.00810.71
5.4.70.0130.00310.97
5.4.60.0110.00711.07
5.4.50.0120.00411.06
5.4.40.0130.00511.14
5.4.30.0090.00811.12
5.4.20.0110.00811.16
5.4.10.0000.01411.05
5.4.00.0090.00611.03
5.3.290.0120.00610.72
5.3.280.0080.00510.59
5.3.270.0070.01210.59
5.3.260.0140.00210.58
5.3.250.0070.01010.40
5.3.240.0130.00010.27
5.3.230.0140.00410.60
5.3.220.0100.00310.39
5.3.210.0090.00610.47
5.3.200.0050.01010.21
5.3.190.0070.01110.50
5.3.180.0140.00310.59
5.3.170.0080.00910.66
5.3.160.0140.00010.62
5.3.150.0140.00310.58
5.3.140.0100.00510.33
5.3.130.0140.00010.59
5.3.120.0070.00710.60
5.3.110.0120.00310.43
5.3.100.0070.01010.51
5.3.90.0130.00510.27
5.3.80.0110.00310.39
5.3.70.0130.00010.11
5.3.60.0140.00010.57
5.3.50.0120.00310.48
5.3.40.0140.00010.47
5.3.30.0030.01010.30
5.3.20.0080.00410.50
5.3.10.0120.00010.08
5.3.00.0060.00610.28
5.2.170.0090.0069.70
5.2.160.0080.0049.59
5.2.150.0100.0039.59
5.2.140.0110.0009.51
5.2.130.0050.0059.55
5.2.120.0100.0039.53
5.2.110.0030.0099.35
5.2.100.0040.0079.27
5.2.90.0090.0029.55
5.2.80.0030.0069.22
5.2.70.0070.0049.45
5.2.60.0000.0109.18
5.2.50.0090.0059.43
5.2.40.0030.0079.45
5.2.30.0050.0069.42
5.2.20.0060.0069.36
5.2.10.0090.0039.22
5.2.00.0140.0009.21
5.1.60.0060.0068.86
5.1.50.0100.0038.86
5.1.40.0040.0048.86
5.1.30.0040.0078.86
5.1.20.0050.0058.86
5.1.10.0030.0068.86
5.1.00.0060.0038.86
5.0.50.0030.0058.86
5.0.40.0070.0008.86
5.0.30.0070.0008.86
5.0.20.0040.0048.86
5.0.10.0070.0008.86
5.0.00.0050.0028.86
4.4.90.0060.0008.86
4.4.80.0070.0008.86
4.4.70.0070.0008.86
4.4.60.0060.0008.86
4.4.50.0090.0008.86
4.4.40.0080.0008.86
4.4.30.0040.0048.86
4.4.20.0030.0068.86
4.4.10.0060.0008.86
4.4.00.0060.0008.86
4.3.110.0060.0008.86
4.3.100.0060.0008.86
4.3.90.0000.0078.86
4.3.80.0030.0038.86
4.3.70.0000.0088.86
4.3.60.0000.0068.86
4.3.50.0080.0008.86
4.3.40.0030.0068.86
4.3.30.0030.0038.86
4.3.20.0050.0028.86
4.3.10.0030.0038.86
4.3.00.0050.0028.86

preferences:
58.26 ms | 401 KiB | 5 Q