3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { var $my_public = array(); //forward php4 to constructor function foo() { $this->my_public[] = 'php4 constructor'; return $this->__construct(); } //constructor php5 function __construct() { $this->my_public[] = 'php4 constructor'; register_shutdown_function(array(&$this, "__destruct")); } function dump() { print_r($this->my_public); } } $test = new 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.3.60.0140.00718.43
8.3.50.0100.00722.05
8.3.40.0140.00418.71
8.3.30.0080.00819.04
8.3.20.0070.00020.21
8.3.10.0040.00421.80
8.3.00.0070.00022.37
8.2.180.0070.01316.50
8.2.170.0110.00822.96
8.2.160.0120.00420.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.01326.16
8.2.120.0040.00419.36
8.2.110.0040.00420.38
8.2.100.0070.00319.40
8.2.90.0040.00419.27
8.2.80.0000.00817.97
8.2.70.0050.00317.50
8.2.60.0060.00317.80
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0000.00718.05
8.2.20.0040.00417.79
8.2.10.0070.00019.59
8.2.00.0000.00717.80
8.1.280.0070.01125.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.96
8.1.230.0060.00619.07
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0060.00317.54
8.1.180.0040.00418.10
8.1.170.0040.00418.50
8.1.160.0040.00422.07
8.1.150.0000.00718.60
8.1.140.0000.00717.45
8.1.130.0030.00317.76
8.1.120.0000.00717.40
8.1.110.0070.00017.47
8.1.100.0040.00317.32
8.1.90.0000.00717.35
8.1.80.0080.00017.48
8.1.70.0030.00317.39
8.1.60.0050.00517.58
8.1.50.0000.00817.56
8.1.40.0070.00017.48
8.1.30.0050.00217.47
8.1.20.0080.00017.60
8.1.10.0040.00417.56
8.1.00.0000.00817.44
8.0.300.0000.00718.77
8.0.290.0070.00017.18
8.0.280.0040.00418.38
8.0.270.0000.00717.18
8.0.260.0030.00316.76
8.0.250.0040.00416.94
8.0.240.0040.00417.03
8.0.230.0040.00716.97
8.0.220.0040.00416.93
8.0.210.0070.00016.94
8.0.200.0040.00417.12
8.0.190.0030.00517.04
8.0.180.0030.00316.89
8.0.170.0040.00416.89
8.0.160.0020.00516.96
8.0.150.0070.00016.97
8.0.140.0000.00716.81
8.0.130.0000.00513.39
8.0.120.0050.00216.81
8.0.110.0050.00316.93
8.0.100.0030.00316.84
8.0.90.0040.00416.83
8.0.80.0100.00717.02
8.0.70.0000.00716.79
8.0.60.0040.00416.80
8.0.50.0040.00417.01
8.0.30.0090.00917.22
8.0.20.0050.01317.40
8.0.10.0070.00016.88
8.0.00.0120.01016.80
7.4.330.0050.00015.22
7.4.320.0030.00316.55
7.4.300.0000.00616.41
7.4.290.0040.00416.60
7.4.280.0000.00716.50
7.4.270.0000.00716.60
7.4.260.0040.00716.48
7.4.250.0040.00416.61
7.4.240.0020.00516.55
7.4.230.0070.00016.60
7.4.220.0040.01216.45
7.4.210.0060.01116.58
7.4.200.0070.00016.68
7.4.190.0000.00716.63
7.4.160.0130.01016.48
7.4.150.0140.00717.40
7.4.140.0080.01017.86
7.4.130.0140.00316.59
7.4.120.0100.00816.51
7.4.110.0070.01016.48
7.4.100.0070.01716.43
7.4.90.0100.00716.64
7.4.80.0160.00619.39
7.4.70.0070.01016.61
7.4.60.0130.01016.50
7.4.50.0000.00916.55
7.4.40.0030.01022.77
7.4.30.0030.01316.64
7.4.00.0070.01014.96
7.3.330.0020.00213.18
7.3.320.0030.00313.36
7.3.310.0000.00716.32
7.3.300.0000.00716.28
7.3.290.0120.00316.40
7.3.280.0050.01316.37
7.3.270.0090.00617.40
7.3.260.0140.00516.64
7.3.250.0110.01016.44
7.3.240.0090.00916.34
7.3.230.0160.00416.42
7.3.210.0070.01116.47
7.3.200.0100.00619.39
7.3.190.0120.00616.28
7.3.180.0040.01116.49
7.3.170.0100.00716.50
7.3.160.0100.00716.20
7.3.120.0060.00914.75
7.3.10.0100.00616.82
7.3.00.0040.01216.56
7.2.330.0140.00616.34
7.2.320.0180.00316.78
7.2.310.0060.01516.81
7.2.300.0030.01416.28
7.2.290.0080.00816.80
7.2.130.0070.00716.97
7.2.120.0030.01016.94
7.2.110.0100.00016.82
7.2.100.0110.00416.83
7.2.90.0110.00317.01
7.2.80.0100.00717.05
7.2.70.0150.00016.81
7.2.60.0090.00416.78
7.2.50.0000.01416.63
7.2.40.0080.00316.71
7.2.30.0090.00616.89
7.2.20.0070.00716.79
7.2.10.0030.00616.80
7.2.00.0080.00518.12
7.1.250.0070.00715.46
7.1.200.0060.00615.52
7.1.100.0030.00617.86
7.1.70.0000.01017.15
7.1.60.0000.01719.82
7.1.50.0100.01316.64
7.1.00.0030.07722.41
7.0.200.0040.00916.68
7.0.140.0070.07022.22
7.0.60.0130.07720.07
7.0.50.0070.06317.85
7.0.40.0070.06320.04
7.0.30.0300.07720.11
7.0.20.0170.05320.23
7.0.10.0000.04720.15
7.0.00.0130.07720.20
5.6.280.0070.07021.05
5.6.210.0070.08720.52
5.6.200.0070.05318.16
5.6.190.0070.06320.68
5.6.180.0230.04720.61
5.6.170.0230.08020.45
5.6.160.0030.05720.54
5.6.150.0000.06318.29
5.6.140.0000.06018.18
5.6.130.0130.07318.16
5.6.120.0070.08020.97
5.6.110.0200.07320.96
5.6.100.0100.06021.00
5.6.90.0070.04021.01
5.6.80.0070.07320.38
5.5.350.0400.06020.33
5.5.340.0100.03318.07
5.5.330.0030.04020.25
5.5.320.0230.04320.36
5.5.310.0230.07720.34
5.5.300.0100.08018.14
5.5.290.0000.04718.04
5.5.280.0130.07720.97
5.5.270.0100.08320.89
5.5.260.0100.08020.96
5.5.250.0000.08720.71
5.5.240.0070.07720.28
5.4.450.0630.06019.69
5.4.440.0770.05719.14
5.4.430.0130.05019.46
5.4.420.0100.05719.63
5.4.410.0070.06018.80
5.4.400.0070.05318.85
5.4.390.0170.05018.82
5.4.380.0130.05018.61
5.4.370.0200.04718.47
5.4.360.0100.05718.48
5.4.350.0200.06318.78
5.4.340.0030.06018.62
5.4.320.0060.03712.51
5.4.310.0070.03612.50
5.4.300.0090.04312.51
5.4.290.0050.03912.51
5.4.280.0070.04212.40
5.4.270.0200.05718.84
5.4.260.0130.05019.10
5.4.250.0100.05718.90
5.4.240.0070.08318.95
5.4.230.0170.07018.98
5.4.220.0200.05319.00
5.4.210.0030.07718.84
5.4.200.0130.06318.83
5.4.190.0030.05319.05
5.4.180.0130.05018.98
5.4.170.0100.07318.98
5.4.160.0130.06318.72
5.4.150.0100.05018.99
5.4.140.0070.05316.61
5.4.130.0130.06316.32
5.4.120.0100.06016.47
5.4.110.0070.07016.57
5.4.100.0100.04716.38
5.4.90.0100.07016.68
5.4.80.0170.06316.47
5.4.70.0170.05316.69
5.4.60.0130.06316.54
5.4.50.0170.07016.42
5.4.40.0130.05716.59
5.4.30.0130.06016.50
5.4.20.0100.06016.46
5.4.10.0100.07016.48
5.4.00.0170.04316.03
5.3.290.0040.04112.80
5.3.280.0000.07714.61
5.3.270.0170.07014.63
5.3.260.0130.04314.52
5.3.250.0070.07014.45
5.3.240.0070.05714.70
5.3.230.0070.08014.79
5.3.220.0130.07014.68
5.3.210.0170.06014.55
5.3.200.0130.05314.41
5.3.190.0130.05714.74
5.3.180.0000.06314.40
5.3.170.0170.06014.47
5.3.160.0100.06314.66
5.3.150.0070.06314.75
5.3.140.0070.05014.74
5.3.130.0030.05714.54
5.3.120.0130.07014.56
5.3.110.0100.06314.53
5.3.100.0030.06714.13
5.3.90.0100.07314.04
5.3.80.0200.06313.93
5.3.70.0100.05014.10
5.3.60.0100.05714.00
5.3.50.0170.06014.13
5.3.40.0070.06713.97
5.3.30.0130.06313.99
5.3.20.0130.04313.52
5.3.10.0130.05313.67
5.3.00.0100.07013.71
5.2.170.0100.05311.21
5.2.160.0100.03711.22
5.2.150.0200.05311.16
5.2.140.0100.03711.30
5.2.130.0030.05011.09
5.2.120.0030.06311.09
5.2.110.0100.04711.11
5.2.100.0070.06311.20
5.2.90.0000.06011.02
5.2.80.0100.03710.93
5.2.70.0100.04311.09
5.2.60.0100.05311.13
5.2.50.0030.04310.86
5.2.40.0070.04010.98
5.2.30.0070.05310.96
5.2.20.0130.04710.97
5.2.10.0100.05011.04
5.2.00.0100.04710.71
5.1.60.0030.0479.83
5.1.50.0070.04010.10
5.1.40.0100.0339.97
5.1.30.0030.03710.34
5.1.20.0100.04710.44
5.1.10.0030.04010.05
5.1.00.0070.0339.92
5.0.50.0000.0438.62
5.0.40.0030.0308.48
5.0.30.0030.0538.06
5.0.20.0030.0378.27
5.0.10.0000.0408.27
5.0.00.0030.0438.26
4.4.90.0070.0307.35
4.4.80.0030.0307.35
4.4.70.0000.0277.35
4.4.60.0070.0237.35
4.4.50.0030.0337.35
4.4.40.0000.0477.35
4.4.30.0030.0307.35
4.4.20.0000.0377.35
4.4.10.0130.0237.35
4.4.00.0030.0377.35
4.3.110.0030.0337.35
4.3.100.0030.0207.35
4.3.90.0100.0207.35
4.3.80.0130.0277.35
4.3.70.0070.0207.35
4.3.60.0000.0237.35
4.3.50.0130.0137.35
4.3.40.0000.0477.35
4.3.30.0000.0307.35
4.3.20.0000.0277.35
4.3.10.0000.0237.35
4.3.00.0100.0236.95

preferences:
40.55 ms | 401 KiB | 5 Q