3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements Serializable { private $foo = "Test"; public function __serialize(): array { return [ 'foo' => $this->foo ]; } public function __unserialize( array $data ): void { $this->foo = $data['foo']; } public function serialize() { return serialize( $this->__serialize() ); } public function unserialize( $serialized ): void { $this->__unserialize( unserialize( $serialized ) ); } } echo serialize(new Test()) . "\n"; // PHP 7.00 - 7.3.33 echo get_class(unserialize('C:4:"Test":27:{a:1:{s:3:"foo";s:4:"Test";}}')) . "\n"; // PHP 7.4.0 - 8.1.9 echo get_class(unserialize('O:4:"Test":1:{s:3:"foo";s:4:"Test";}')) . "\n";

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.00618.43
8.3.50.0100.01018.34
8.3.40.0070.00720.29
8.3.30.0120.00318.87
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0070.00326.16
8.2.180.0040.01125.92
8.2.170.0120.00319.06
8.2.160.0100.00322.96
8.2.150.0050.00325.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.66
8.2.110.0090.00020.41
8.2.100.0070.00717.84
8.2.90.0030.00617.75
8.2.80.0030.00718.78
8.2.70.0000.00817.46
8.2.60.0000.00818.04
8.2.50.0040.00418.07
8.2.40.0040.00419.88
8.2.30.0040.00418.07
8.2.20.0030.00619.33
8.2.10.0070.00018.20
8.2.00.0000.00719.20
8.1.280.0180.00025.92
8.1.270.0050.00324.66
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0150.00623.89
8.1.230.0060.00622.20
8.1.220.0040.00417.78
8.1.210.0050.00318.77
8.1.200.0030.00717.36
8.1.190.0080.00017.35
8.1.180.0040.00418.10
8.1.170.0000.00818.65
8.1.160.0040.00419.03
8.1.150.0040.00418.59
8.1.140.0070.00017.47
8.1.130.0070.00018.85
8.1.120.0070.00017.51
8.1.110.0040.00417.47
8.1.100.0040.00417.40
8.1.90.0100.00417.40
8.1.80.0130.00417.40
8.1.70.0120.00517.41
8.1.60.0110.00717.56
8.1.50.0150.00317.52
8.1.40.0130.00517.53
8.1.30.0150.00317.59
8.1.20.0150.00217.64
8.1.10.0160.00217.54
8.1.00.0160.00217.43
8.0.300.0040.00418.98
8.0.290.0040.00416.63
8.0.280.0030.00318.43
8.0.270.0030.00316.95
8.0.260.0040.00418.46
8.0.250.0070.00317.02
8.0.240.0080.00017.06
8.0.230.0030.00317.03
8.0.220.0100.00516.90
8.0.210.0140.00216.90
8.0.200.0100.00516.92
8.0.190.0080.00716.94
8.0.180.0110.00516.89
8.0.170.0090.00616.92
8.0.160.0110.00516.89
8.0.150.0100.00516.81
8.0.140.0110.00416.86
8.0.130.0120.00316.84
8.0.120.0100.00516.92
8.0.110.0100.00416.96
8.0.100.0080.00716.94
8.0.90.0110.00416.94
8.0.80.0100.00416.92
8.0.70.0080.00716.86
8.0.60.0120.00416.85
8.0.50.0130.00216.87
8.0.30.0090.00416.85
8.0.20.0080.00516.86
8.0.10.0070.00516.85
8.0.00.0150.00017.08
7.4.330.0050.00015.55
7.4.320.0060.00016.52
7.4.300.0110.00216.31
7.4.290.0080.00416.25
7.4.280.0060.00716.47
7.4.270.0090.00416.33
7.4.260.0090.00416.21
7.4.250.0120.00116.32
7.4.240.0060.00516.25
7.4.230.0090.00316.02
7.4.220.0050.00716.47
7.4.210.0080.00416.33
7.4.200.0080.00416.28
7.4.190.0090.00316.30
7.4.180.0070.00416.47
7.4.160.0100.00316.38
7.4.150.0070.00516.29
7.4.140.0080.00416.30
7.4.130.0110.00116.34
7.4.120.0080.00416.36
7.4.110.0090.00316.34
7.4.100.0080.00416.35
7.4.90.0090.00316.16
7.4.80.0070.00516.27
7.4.70.0060.00616.38
7.4.60.0090.00316.35
7.4.50.0090.00216.19
7.4.40.0080.00416.32
7.4.30.0070.00416.38
7.4.20.0090.00216.39
7.4.10.0070.00316.31
7.4.00.0050.00616.41
7.3.330.0140.00016.29
7.3.320.0070.00716.50
7.3.310.0050.00916.29
7.3.300.0110.00316.41
7.3.290.0090.00416.36
7.3.280.0090.00616.26
7.3.270.0120.00216.25
7.3.260.0120.00216.34
7.3.250.0050.01016.40
7.3.240.0040.01216.21
7.3.230.0110.00416.43
7.3.220.0150.00016.39
7.3.210.0050.00916.41
7.3.200.0100.00416.38
7.3.190.0100.00516.22
7.3.180.0090.00616.25
7.3.170.0090.00516.23
7.3.160.0070.00716.34
7.3.150.0120.00216.45
7.3.140.0140.00016.23
7.3.130.0120.00216.36
7.3.120.0110.00416.43
7.3.110.0050.01016.33
7.3.100.0090.00616.19
7.3.90.0050.00916.46
7.3.80.0130.00216.17
7.3.70.0070.00716.23
7.3.60.0110.00316.48
7.3.50.0150.00016.46
7.3.40.0140.00016.26
7.3.30.0070.00716.41
7.3.20.0120.00316.50
7.3.10.0120.00416.41
7.3.00.0160.00016.36
7.2.340.0110.00316.26
7.2.330.0080.00616.36
7.2.320.0140.00016.28
7.2.310.0090.00516.23
7.2.300.0090.00516.36
7.2.290.0070.00716.38
7.2.280.0140.00016.22
7.2.270.0140.00016.41
7.2.260.0140.00016.41
7.2.250.0080.00616.36
7.2.240.0070.00716.43
7.2.230.0090.00616.42
7.2.220.0100.00316.46
7.2.210.0120.00216.46
7.2.200.0130.00316.54
7.2.190.0110.00316.59
7.2.180.0100.00316.58
7.2.170.0130.00016.67
7.2.160.0090.00516.66
7.2.150.0120.00316.79
7.2.140.0120.00316.68
7.2.130.0050.01016.79
7.2.120.0090.00616.59
7.2.110.0150.00016.82
7.2.100.0120.00316.82
7.2.90.0160.00016.73
7.2.80.0110.00516.77
7.2.70.0220.00416.58
7.2.60.0150.00016.48
7.2.50.0080.00816.68
7.2.40.0160.00016.73
7.2.30.0120.00416.57
7.2.20.0110.00616.79
7.2.10.0170.00016.79
7.2.00.0140.00416.76
7.1.330.0100.00515.54
7.1.320.0070.00715.41
7.1.310.0140.00015.52
7.1.300.0090.00615.65
7.1.290.0140.00015.44
7.1.280.0100.00515.58
7.1.270.0070.00715.54
7.1.260.0100.00515.65
7.1.250.0090.00615.56
7.1.240.0070.00715.55
7.1.230.0100.00515.44
7.1.220.0070.00715.74
7.1.210.0080.00815.66
7.1.200.0110.00315.45
7.1.190.0170.00315.60
7.1.180.0070.00715.54
7.1.170.0070.00715.36
7.1.160.0110.00315.41
7.1.150.0090.00515.55
7.1.140.0000.01415.57
7.1.130.0140.00015.59
7.1.120.0150.00015.57
7.1.110.0090.00515.61
7.1.100.0070.00715.43
7.1.90.0130.00315.38
7.1.80.0140.00015.47
7.1.70.0140.00015.33
7.1.60.0140.00015.45
7.1.50.0000.01515.70
7.1.40.0050.01015.50
7.1.30.0110.00215.41
7.1.20.0150.00015.57
7.1.10.0110.00315.53
7.1.00.0070.00715.57
7.0.330.0050.00815.30
7.0.320.0070.00715.09
7.0.310.0300.00015.08
7.0.300.0090.00515.02
7.0.290.0080.00615.26
7.0.280.0040.00915.13
7.0.270.0110.00315.18
7.0.260.0050.00815.29
7.0.250.0100.00515.38
7.0.240.0100.00315.19
7.0.230.0070.00715.30
7.0.220.0000.01415.41
7.0.210.0070.00715.22
7.0.200.0000.01415.40
7.0.190.0110.00315.33
7.0.180.0120.00215.15
7.0.170.0070.00715.45
7.0.160.0070.00715.26
7.0.150.0080.00615.34
7.0.140.0080.00615.25
7.0.130.0140.00015.07
7.0.120.0040.01115.19
7.0.110.0090.00515.14
7.0.100.0070.00715.32
7.0.90.0320.00315.19
7.0.80.0100.00415.23
7.0.70.0100.00515.23
7.0.60.0090.00415.34
7.0.50.0100.00315.03
7.0.40.0090.00415.42
7.0.30.0100.00315.10
7.0.20.0130.00015.21
7.0.10.0060.00615.11
7.0.00.0100.00315.04
5.6.400.0040.00915.62
5.6.390.0100.00315.72
5.6.380.0090.00515.71
5.6.370.0090.00415.46
5.6.360.0140.00015.58
5.6.350.0080.00515.52
5.6.340.0080.00615.47
5.6.330.0110.00215.57
5.6.320.0040.00915.61
5.6.310.0100.00315.67
5.6.300.0130.00015.32
5.6.290.0130.00015.37
5.6.280.0090.00415.67
5.6.270.0080.00415.47
5.6.260.0090.00315.59
5.6.250.0080.00515.68
5.6.240.0000.01315.47
5.6.230.0090.00315.63
5.6.220.0130.00015.70
5.6.210.0000.01315.66
5.6.200.0100.00315.76
5.6.190.0100.00315.84
5.6.180.0100.00315.69
5.6.170.0090.00615.69
5.6.160.0100.00515.70
5.6.150.0140.00015.55
5.6.140.0080.00515.73
5.6.130.0080.00415.72
5.6.120.0130.00015.54
5.6.110.0050.00815.65
5.6.100.0120.00215.56
5.6.90.0000.01415.52
5.6.80.0080.00515.62
5.6.70.0090.00315.69
5.6.60.0120.00015.53
5.6.50.0120.00015.51
5.6.40.0120.00015.57
5.6.30.0080.00515.57
5.6.20.0060.00615.62
5.6.10.0070.00715.41
5.6.00.0130.00015.41
5.5.380.0100.00315.68
5.5.370.0060.00615.73
5.5.360.0060.00615.55
5.5.350.0130.00015.41
5.5.340.0090.00415.41
5.5.330.0090.00515.48
5.5.320.0100.00315.59
5.5.310.0090.00415.63
5.5.300.0130.00015.34
5.5.290.0110.00215.53
5.5.280.0040.00915.54
5.5.270.0100.00315.61
5.5.260.0140.00015.30
5.5.250.0090.00515.54
5.5.240.0090.00315.73
5.5.230.0150.00015.68
5.5.220.0090.00415.70
5.5.210.0090.00315.61
5.5.200.0090.00415.37
5.5.190.0080.00515.34
5.5.180.0040.00915.36
5.5.170.0100.00315.52
5.5.160.0070.00515.44
5.5.150.0090.00315.45
5.5.140.0130.00015.22
5.5.130.0040.00915.25
5.5.120.0130.00015.45
5.5.110.0130.00015.23
5.5.100.0000.01315.54
5.5.90.0090.00415.48
5.5.80.0120.00015.63
5.5.70.0060.00615.34
5.5.60.0130.00015.36
5.5.50.0080.00415.46
5.5.40.0030.00915.38
5.5.30.0040.00815.36
5.5.20.0000.01215.63
5.5.10.0090.00315.52
5.5.00.0060.00615.30
5.4.450.0090.00212.59
5.4.440.0080.00312.42
5.4.430.0070.00312.44
5.4.420.0110.00012.40
5.4.410.0030.00712.58
5.4.400.0100.00012.52
5.4.390.0050.00512.34
5.4.380.0090.00212.53
5.4.370.0070.00212.35
5.4.360.0070.00412.21
5.4.350.0070.00312.44
5.4.340.0080.00312.35
5.4.330.0110.00012.13
5.4.320.0110.00012.20
5.4.310.0110.00012.49
5.4.300.0050.00512.50
5.4.290.0070.00312.43
5.4.280.0110.00012.43
5.4.270.0080.00212.58
5.4.260.0080.00212.16
5.4.250.0110.00012.35
5.4.240.0100.00012.35
5.4.230.0110.00011.95
5.4.220.0110.00012.02
5.4.210.0110.00012.14
5.4.200.0070.00312.02
5.4.190.0050.00512.14
5.4.180.0110.00012.26
5.4.170.0070.00412.23
5.4.160.0070.00312.00
5.4.150.0030.00712.39
5.4.140.0050.00512.52
5.4.130.0060.00312.43
5.4.120.0100.00012.39
5.4.110.0030.00712.39
5.4.100.0040.00712.25
5.4.90.0100.00012.40
5.4.80.0100.00012.25
5.4.70.0070.00312.47
5.4.60.0070.00312.33
5.4.50.0030.00712.42
5.4.40.0100.00012.34
5.4.30.0080.00312.39
5.4.20.0050.00512.42
5.4.10.0030.00712.19
5.4.00.0050.00512.24
5.3.290.0080.00212.68
5.3.280.0050.00512.59
5.3.270.0080.00312.60
5.3.260.0090.00312.91
5.3.250.0090.00212.88
5.3.240.0040.00712.75
5.3.230.0030.00712.57
5.3.220.0100.00012.61
5.3.210.0060.00612.56
5.3.200.0100.00012.52
5.3.190.0060.00512.83
5.3.180.0090.00212.86
5.3.170.0040.00712.75
5.3.160.0040.00712.94
5.3.150.0090.00312.75
5.3.140.0080.00312.72
5.3.130.0070.00412.96
5.3.120.0070.00412.91
5.3.110.0050.00512.68
5.3.100.0000.01012.71
5.3.90.0080.00312.86
5.3.80.0110.00012.73
5.3.70.0100.00012.87
5.3.60.0100.00012.85
5.3.50.0100.00012.58
5.3.40.0100.00012.55
5.3.30.0030.00612.59
5.3.20.0100.00012.64
5.3.10.0100.00012.62
5.3.00.0050.00512.32
5.2.170.0040.00411.62
5.2.160.0040.00411.63
5.2.150.0000.00811.85
5.2.140.0040.00411.60
5.2.130.0080.00011.85
5.2.120.0040.00411.61
5.2.110.0090.00011.67
5.2.100.0060.00311.88
5.2.90.0040.00411.61
5.2.80.0090.00011.48
5.2.70.0040.00411.47
5.2.60.0050.00511.73
5.2.50.0060.00211.62
5.2.40.0040.00411.57
5.2.30.0030.00511.47
5.2.20.0040.00411.64
5.2.10.0040.00411.33
5.2.00.0060.00211.27
5.1.60.0070.00010.88
5.1.50.0040.00410.91
5.1.40.0080.00011.01
5.1.30.0070.00010.88
5.1.20.0070.00010.85
5.1.10.0000.00710.91
5.1.00.0080.00010.46
5.0.50.0060.00010.20
5.0.40.0070.0009.71
5.0.30.0000.0069.75
5.0.20.0000.0079.72
5.0.10.0050.0009.77
5.0.00.0000.0069.49
4.4.90.0000.0049.29
4.4.80.0040.0009.29
4.4.70.0040.0009.29
4.4.60.0030.0009.29
4.4.50.0030.0009.29
4.4.40.0040.0009.29
4.4.30.0040.0009.29
4.4.20.0040.0009.29
4.4.10.0000.0049.29
4.4.00.0000.0039.29
4.3.110.0030.0009.29
4.3.100.0030.0009.29
4.3.90.0040.0009.29
4.3.80.0000.0049.29
4.3.70.0040.0009.29
4.3.60.0040.0009.29
4.3.50.0040.0009.29
4.3.40.0000.0049.29
4.3.30.0000.0039.29
4.3.20.0000.0039.29
4.3.10.0000.0039.29
4.3.00.0030.0009.29

preferences:
37.7 ms | 400 KiB | 5 Q