3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassPHP74 { private string $field; public function __construct(string $field) { $this->field = $field; } public function getField(): string { return $this->field; } } class ClassPHP81 { public function __construct(public readonly string $field) {} } $php74 = new ClassPHP74('coucou'); var_dump($php74->getField()); var_dump($php74->__construct('hello')); var_dump($php74->getField()); $php81 = new ClassPHP81('coucou'); var_dump($php81->field); var_dump($php81->__construct('hello')); var_dump($php81->field);

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.0.100.0060.00216.91
8.0.90.0060.00216.82
8.0.80.0040.00416.83
8.0.70.0030.00416.84
8.0.60.0030.00516.73
8.0.50.0060.00216.73
8.0.30.0040.00416.77
8.0.20.0040.00416.89
8.0.10.0040.00416.88
8.0.00.0030.00516.80
7.4.220.0030.00516.38
7.4.210.0030.00516.40
7.4.200.0040.00316.45
7.4.190.0040.00416.48
7.4.180.0060.00216.40
7.4.160.0010.00616.43
7.4.150.0030.00516.32
7.4.140.0050.00316.35
7.4.130.0050.00316.34
7.4.120.0050.00316.27
7.4.110.0010.00716.09
7.4.100.0030.00516.29
7.4.90.0040.00316.32
7.4.80.0040.00416.15
7.4.70.0030.00516.28
7.4.60.0030.00516.21
7.4.50.0030.00516.05
7.4.40.0050.00416.12
7.4.30.0030.00516.33
7.4.20.0030.00416.10
7.4.10.0020.00616.22
7.4.00.0040.00416.37
7.3.290.0030.00516.14
7.3.280.0060.00216.15
7.3.270.0040.00416.11
7.3.260.0020.00516.17
7.3.250.0030.00516.16
7.3.240.0040.00416.10
7.3.230.0000.00816.09
7.3.220.0050.00216.04
7.3.210.0060.00116.02
7.3.200.0010.00616.14
7.3.190.0020.00516.08
7.3.180.0010.00716.08
7.3.170.0050.00216.13
7.3.160.0010.00716.12
7.3.150.0040.00416.11
7.3.140.0030.00516.11
7.3.130.0020.00516.14
7.3.120.0040.00316.07
7.3.110.0040.00416.03
7.3.100.0010.00715.99
7.3.90.0050.00316.27
7.3.80.0060.00216.11
7.3.70.0070.00016.17
7.3.60.0050.00216.13
7.3.50.0040.00416.18
7.3.40.0030.00516.20
7.3.30.0030.00516.16
7.3.20.0050.00317.43
7.3.10.0040.00517.38
7.3.00.0050.00317.37
7.2.340.0100.00516.15
7.2.330.0040.01116.07
7.2.320.0150.00016.11
7.2.310.0110.00316.15
7.2.300.0100.00516.13
7.2.290.0110.00416.12
7.2.280.0120.00415.86
7.2.270.0150.00016.15
7.2.260.0130.00216.12
7.2.250.0000.01416.14
7.2.240.0100.00416.16
7.2.230.0120.00315.95
7.2.220.0050.00916.11
7.2.210.0100.00316.07
7.2.200.0080.00816.23
7.2.190.0050.01016.22
7.2.180.0100.00516.26
7.2.170.0000.01416.14
7.2.160.0000.01416.30
7.2.150.0120.00418.03
7.2.140.0130.00218.28
7.2.130.0110.00618.31
7.2.120.0130.00318.17
7.2.110.0110.00418.17
7.2.100.0110.00518.30
7.2.90.0060.00918.19
7.2.80.0100.00518.19
7.2.70.0120.00318.08
7.2.60.0100.00518.19
7.2.50.0050.01018.08
7.2.40.0170.00017.95
7.2.30.0000.01418.28
7.2.20.0070.00718.22
7.2.10.0050.01018.22
7.2.00.0110.00418.11
7.1.330.0110.00617.13
7.1.320.0100.00217.19
7.1.310.0000.01317.01
7.1.300.0120.00016.94
7.1.290.0120.00016.99
7.1.280.0060.00317.13
7.1.270.0110.00217.05
7.1.260.0080.00817.09
7.1.250.0090.00517.01
7.1.240.0090.00417.01
7.1.230.0060.00917.08
7.1.220.0100.00317.12
7.1.210.0110.00317.05
7.1.200.0110.00317.16
7.1.190.0080.00517.08
7.1.180.0140.00017.05
7.1.170.0080.00417.00
7.1.160.0110.00217.08
7.1.150.0070.00717.09
7.1.140.0000.01417.04
7.1.130.0140.00017.05
7.1.120.0090.00517.09
7.1.110.0040.01016.96
7.1.100.0120.00316.99
7.1.90.0110.00216.98
7.1.80.0090.00317.09
7.1.70.0070.00416.75
7.1.60.0090.00317.02
7.1.50.0060.00617.02
7.1.40.0060.00417.06
7.1.30.0050.00516.96
7.1.20.0080.00316.96
7.1.10.0060.00616.89
7.1.00.0070.00816.93
7.0.330.0060.00616.80
7.0.320.0080.00416.74
7.0.310.0060.00616.60
7.0.300.0110.00016.63
7.0.290.0080.00416.64
7.0.280.0030.00716.63
7.0.270.0050.00716.71
7.0.260.0040.00816.79
7.0.250.0050.00516.95
7.0.240.0000.01316.86
7.0.230.0050.00816.88
7.0.220.0050.00716.80
7.0.210.0040.00816.95
7.0.200.0080.00416.93
7.0.190.0100.00016.77
7.0.180.0080.00416.77
7.0.170.0060.00616.70
7.0.160.0090.00316.79
7.0.150.0040.00816.64
7.0.140.0030.00916.77
7.0.130.0050.00316.86
7.0.120.0060.00316.97
7.0.110.0060.00516.73
7.0.100.0090.00316.82
7.0.90.0040.00416.79
7.0.80.0030.00616.79
7.0.70.0120.00016.73
7.0.60.0050.00516.82
7.0.50.0040.00716.66
7.0.40.0030.00616.74
7.0.30.0050.00516.88
7.0.20.0020.00816.67
7.0.10.0070.00416.84
7.0.00.0040.00416.84
5.6.400.0060.00615.50
5.6.390.0000.01015.46
5.6.380.0080.00415.49
5.6.370.0000.00815.49
5.6.360.0070.00315.43
5.6.350.0050.00515.65
5.6.340.0090.00215.41
5.6.330.0060.00615.48
5.6.320.0090.00315.48
5.6.310.0050.00615.52
5.6.300.0090.00015.34
5.6.290.0060.00415.63
5.6.280.0090.00015.52
5.6.270.0000.01015.40
5.6.260.0080.00415.58
5.6.250.0130.00015.38
5.6.240.0120.00015.49
5.6.230.0060.00315.48
5.6.220.0090.00015.53
5.6.210.0050.00515.48
5.6.200.0000.00815.92
5.6.190.0030.00715.56
5.6.180.0000.01015.67
5.6.170.0110.00015.82
5.6.160.0090.00015.60
5.6.150.0050.00515.61
5.6.140.0070.00215.61
5.6.130.0040.00415.51
5.6.120.0030.00715.41
5.6.110.0040.00715.46
5.6.100.0000.00915.45
5.6.90.0060.00215.64
5.6.80.0040.00815.47
5.6.70.0070.00515.79
5.6.60.0060.00715.57
5.6.50.0060.00615.74
5.6.40.0100.00315.52
5.6.30.0030.00915.38
5.6.20.0060.00615.39
5.6.10.0080.00315.63
5.6.00.0090.00415.75
5.5.380.0060.00615.70
5.5.370.0060.00715.74
5.5.360.0130.00015.58
5.5.350.0110.00015.37
5.5.340.0060.00415.44
5.5.330.0060.00615.48
5.5.320.0120.00015.39
5.5.310.0080.00415.50
5.5.300.0100.00315.43
5.5.290.0110.00015.42
5.5.280.0090.00315.32
5.5.270.0120.00015.45
5.5.260.0080.00315.47
5.5.250.0040.00815.66
5.5.240.0090.00315.62
5.5.230.0110.00015.45
5.5.220.0110.00015.51
5.5.210.0090.00315.64
5.5.200.0100.00215.48
5.5.190.0040.00915.45
5.5.180.0040.00715.52
5.5.170.0110.00015.41
5.5.160.0030.00715.27
5.5.150.0070.00515.34
5.5.140.0090.00415.23
5.5.130.0080.00415.38
5.5.120.0120.00015.22
5.5.110.0000.01315.33
5.5.100.0060.00615.50
5.5.90.0080.00515.49
5.5.80.0050.00315.47
5.5.70.0070.00315.53
5.5.60.0130.00015.53
5.5.50.0080.00415.40
5.5.40.0080.00415.50
5.5.30.0080.00415.45
5.5.20.0050.00715.45
5.5.10.0090.00315.27
5.5.00.0040.00815.26
5.4.450.0050.00512.41
5.4.440.0100.00012.26
5.4.430.0090.00012.34
5.4.420.0090.00012.57
5.4.410.0100.00012.26
5.4.400.0050.00512.30
5.4.390.0050.00512.18
5.4.380.0100.00012.42
5.4.370.0050.00512.50
5.4.360.0060.00312.42
5.4.350.0070.00312.34
5.4.340.0080.00312.33
5.4.330.0080.00212.34
5.4.320.0100.00012.46
5.4.310.0080.00312.43
5.4.300.0050.00512.45
5.4.290.0110.00012.23
5.4.280.0050.00512.27
5.4.270.0000.01012.47
5.4.260.0080.00312.40
5.4.250.0030.00712.20
5.4.240.0100.00012.42
5.4.230.0050.00512.07
5.4.220.0050.00512.01
5.4.210.0060.00512.12
5.4.200.0090.00312.11
5.4.190.0080.00212.15
5.4.180.0100.00012.21
5.4.170.0090.00212.26
5.4.160.0100.00012.35
5.4.150.0100.00012.09
5.4.140.0030.00612.40
5.4.130.0060.00312.45
5.4.120.0060.00312.22
5.4.110.0030.00512.48
5.4.100.0000.01012.22
5.4.90.0090.00012.30
5.4.80.0080.00012.58
5.4.70.0000.00812.44
5.4.60.0080.00312.57
5.4.50.0060.00312.39
5.4.40.0070.00212.39
5.4.30.0060.00312.39
5.4.20.0060.00312.40
5.4.10.0080.00212.34
5.4.00.0050.00512.27
5.3.290.0000.01012.91
5.3.280.0070.00212.66
5.3.270.0070.00312.58
5.3.260.0060.00312.60
5.3.250.0070.00312.78
5.3.240.0090.00012.67
5.3.230.0050.00512.52
5.3.220.0070.00212.59
5.3.210.0070.00412.84
5.3.200.0060.00312.89
5.3.190.0070.00412.58
5.3.180.0030.00713.00
5.3.170.0090.00013.02
5.3.160.0060.00312.73
5.3.150.0050.00512.90
5.3.140.0110.00012.84
5.3.130.0060.00412.90
5.3.120.0060.00612.60
5.3.110.0030.00712.66
5.3.100.0060.00412.73
5.3.90.0080.00212.90
5.3.80.0110.00012.70
5.3.70.0090.00012.61
5.3.60.0020.00712.82
5.3.50.0090.00012.64
5.3.40.0060.00312.81
5.3.30.0090.00012.96
5.3.20.0060.00312.70
5.3.10.0030.00612.66
5.3.00.0080.00012.30
5.2.170.0070.00211.93
5.2.160.0080.00011.88
5.2.150.0030.00411.94
5.2.140.0020.00511.86
5.2.130.0040.00411.66
5.2.120.0000.00811.80
5.2.110.0000.00611.57
5.2.100.0030.00311.78
5.2.90.0020.00511.72
5.2.80.0030.00311.81
5.2.70.0040.00411.75
5.2.60.0000.00611.41
5.2.50.0050.00511.66
5.2.40.0040.00411.65
5.2.30.0020.00611.70
5.2.20.0040.00411.36
5.2.10.0000.00711.51
5.2.00.0060.00211.48
5.1.60.0070.00011.21
5.1.50.0050.00211.21
5.1.40.0040.00411.21
5.1.30.0020.00511.21
5.1.20.0070.00011.21
5.1.10.0000.00811.21
5.1.00.0060.00211.21
5.0.50.0040.00411.21
5.0.40.0070.00011.21
5.0.30.0030.00411.21
5.0.20.0000.00611.21
5.0.10.0040.00211.21
5.0.00.0030.00311.21
4.4.90.0040.00011.21
4.4.80.0040.00011.21
4.4.70.0050.00011.21
4.4.60.0000.00411.21
4.4.50.0040.00011.21
4.4.40.0000.00411.21
4.4.30.0040.00011.21
4.4.20.0040.00011.21
4.4.10.0000.00411.21
4.4.00.0000.00411.21
4.3.110.0040.00011.21
4.3.100.0000.00411.21
4.3.90.0020.00211.21
4.3.80.0000.00411.21
4.3.70.0020.00211.21
4.3.60.0040.00011.21
4.3.50.0040.00011.21
4.3.40.0000.00411.21
4.3.30.0020.00211.21
4.3.20.0000.00411.21
4.3.10.0020.00211.21
4.3.00.0020.00211.21

preferences:
15.91 ms | 451 KiB | 5 Q