3v4l.org

run code in 300+ PHP versions simultaneously
<?php #gc_disable(); class x { public $value; public $y; public function __construct($value) { $this->value = $value; $this->y = new y(); } } class y { } $array = array(); $objects = array(); for($i = 0; $i < 50000; $i++) { $value = md5('Hallo'); $objects[] = new x($value); $array[] = $value; } var_dump(number_format(memory_get_usage(), 0, ',', '.')) . "\n"; var_dump(number_format(memory_get_usage(true), 0,',','.')) . "\n"; unset($array); unset($objects); unset($value); var_dump(number_format(memory_get_usage(), 0, ',', '.')) . "\n"; var_dump(number_format(memory_get_usage(true), 0,',','.')) . "\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)
7.4.10.0120.04928.47
7.4.00.0210.04228.15
7.3.130.0130.04028.20
7.3.120.0220.03828.14
7.3.110.0160.04827.92
7.3.100.0110.04528.05
7.3.90.0090.04328.13
7.3.80.0130.03128.05
7.3.70.0120.03227.97
7.3.60.0110.03228.05
7.3.50.0120.03528.07
7.3.40.0120.03128.07
7.3.30.0120.03028.01
7.3.20.0090.03431.11
7.3.10.0140.03430.91
7.3.00.0090.03331.02
7.2.260.0160.04528.72
7.2.250.0120.04828.48
7.2.240.0140.04628.39
7.2.230.0160.03728.44
7.2.220.0150.04228.44
7.2.210.0130.03628.32
7.2.200.0080.04028.27
7.2.190.0100.04528.39
7.2.180.0130.03128.46
7.2.170.0090.03628.21
7.2.160.0160.03628.62
7.2.150.0050.03831.71
7.2.140.0050.03831.86
7.2.130.0210.03931.35
7.2.120.0160.03931.27
7.2.110.0260.03131.42
7.2.100.0230.03431.25
7.2.90.0180.03931.56
7.2.80.0230.03631.38
7.2.70.0240.03531.39
7.2.60.0240.04231.32
7.2.50.0170.03731.47
7.2.40.0160.03631.42
7.2.30.0210.04231.39
7.2.20.0300.03331.39
7.2.10.0230.03431.49
7.2.00.0160.03931.85
7.1.330.0090.04830.48
7.1.320.0090.04830.40
7.1.310.0080.05230.41
7.1.300.0020.05730.44
7.1.290.0100.04330.34
7.1.280.0020.05430.46
7.1.270.0080.04930.40
7.1.260.0100.05130.50
7.1.250.0100.05730.30
7.1.240.0070.04630.60
7.1.230.0080.04830.61
7.1.220.0050.04830.74
7.1.210.0100.04630.66
7.1.200.0030.05030.65
7.1.190.0060.04630.58
7.1.180.0080.05230.66
7.1.170.0050.04730.72
7.1.160.0070.04630.64
7.1.150.0050.05730.81
7.1.140.0110.04430.72
7.1.130.0100.04730.68
7.1.120.0090.05030.53
7.1.110.0070.06030.45
7.1.100.0070.05130.66
7.1.90.0080.04630.52
7.1.80.0130.04830.74
7.1.70.0060.04430.72
7.1.60.0060.05030.78
7.1.50.0180.05230.81
7.1.40.0080.05330.58
7.1.30.0020.05530.84
7.1.20.0070.04630.54
7.1.10.0030.04630.77
7.1.00.0030.07032.62
7.0.330.0050.05530.34
7.0.320.0020.05030.20
7.0.310.0080.04930.28
7.0.300.0020.05430.43
7.0.290.0080.05230.33
7.0.280.0030.05830.30
7.0.270.0070.04330.41
7.0.260.0070.06530.29
7.0.250.0120.05330.42
7.0.240.0080.04630.35
7.0.230.0030.05030.45
7.0.220.0050.05130.23
7.0.210.0100.04530.27
7.0.200.0070.05630.36
7.0.190.0030.05330.42
7.0.180.0070.05630.26
7.0.170.0050.04730.49
7.0.160.0080.04630.38
7.0.150.0120.03630.43
7.0.140.0070.06632.38
7.0.130.0100.04730.34
7.0.120.0050.04730.42
7.0.110.0070.04830.27
7.0.100.0100.04930.38
7.0.90.0110.04430.51
7.0.80.0100.04930.33
7.0.70.0030.05230.44
7.0.60.0070.07631.15
7.0.50.0070.06530.61
7.0.40.0090.05320.04
7.0.30.0140.07620.10
7.0.20.0190.07420.08
7.0.10.0090.06320.11
7.0.00.0070.06520.01
5.6.400.0160.12746.94
5.6.390.0100.10147.15
5.6.380.0150.10947.00
5.6.370.0310.09447.14
5.6.360.0180.10747.16
5.6.350.0230.09747.02
5.6.340.0180.09846.97
5.6.330.0180.09847.00
5.6.320.0150.10446.91
5.6.310.0230.12246.88
5.6.300.0180.09847.10
5.6.290.0250.09447.00
5.6.280.0210.11049.09
5.6.270.0200.10647.04
5.6.260.0220.10246.88
5.6.250.0180.10646.87
5.6.240.0200.11047.08
5.6.230.0160.10646.86
5.6.220.0300.11547.13
5.6.210.0240.11448.78
5.6.200.0240.11147.85
5.6.190.0310.09348.56
5.6.180.0360.11548.63
5.6.170.0340.10648.48
5.6.160.0180.10548.62
5.6.150.0130.11747.86
5.6.140.0190.09547.91
5.6.130.0240.12447.79
5.6.120.0280.11848.82
5.6.110.0280.11648.75
5.6.100.0210.10948.86
5.6.90.0220.12348.70
5.6.80.0220.10648.68
5.6.70.1930.10348.63
5.6.60.0280.12646.95
5.6.50.0120.11146.85
5.6.40.0150.11746.93
5.6.30.0120.11746.77
5.6.20.0220.10246.61
5.6.10.0200.10546.71
5.6.00.0220.10346.76
5.5.380.0180.11446.65
5.5.370.0220.10646.98
5.5.360.0170.11646.76
5.5.350.0370.12748.68
5.5.340.0140.14247.94
5.5.330.0210.12748.42
5.5.320.0240.11248.53
5.5.310.0280.12048.48
5.5.300.0140.13547.88
5.5.290.0250.13147.70
5.5.280.0200.10448.77
5.5.270.0200.12248.63
5.5.260.0190.10648.68
5.5.250.0270.12348.62
5.5.240.0240.10648.40
5.5.230.0250.10746.91
5.5.220.0320.11046.99
5.5.210.0170.12446.90
5.5.200.0180.10646.95
5.5.190.0170.11546.62
5.5.180.0200.10046.78
5.5.170.0270.09246.80
5.5.160.0150.12646.81
5.5.150.0230.11646.74
5.5.140.0130.11946.94
5.5.130.0180.09546.80
5.5.120.0180.11646.94
5.5.110.0130.12046.74
5.5.100.0170.13546.76
5.5.90.0220.11246.71
5.5.80.0100.10346.84
5.5.70.0200.08746.83
5.5.60.0210.11746.68
5.5.50.0280.11046.78
5.5.40.0210.11846.86
5.5.30.0200.11046.62
5.5.20.0300.10846.79
5.5.10.0130.12046.73
5.5.00.0150.11946.74
5.4.450.0490.15246.15
5.4.440.0500.13846.01
5.4.430.0580.12546.01
5.4.420.0480.12946.17
5.4.410.0500.11045.98
5.4.400.0410.14045.82
5.4.390.0510.12645.95
5.4.380.0620.12446.01
5.4.370.0560.11945.97
5.4.360.0570.12945.99
5.4.350.0190.12745.78
5.4.340.0170.11043.57
5.4.330.0170.10943.43
5.4.320.0190.11043.62
5.4.310.0190.11443.69
5.4.300.0200.09943.65
5.4.290.0190.10543.68
5.4.280.0130.11743.67
5.4.270.0190.10743.63
5.4.260.0240.12243.64
5.4.250.0240.10443.62
5.4.240.0280.09443.66
5.4.230.0190.09943.62
5.4.220.0180.12143.75
5.4.210.0210.10643.71
5.4.200.0180.11743.65
5.4.190.0200.10743.66
5.4.180.0090.10943.56
5.4.170.0140.10843.75
5.4.160.0270.11443.71
5.4.150.0190.10243.66
5.4.140.0160.10343.72
5.4.130.0210.11843.66
5.4.120.0150.10943.58
5.4.110.0160.10443.55
5.4.100.0210.09743.48
5.4.90.0190.10443.75
5.4.80.0160.10443.58
5.4.70.0180.10943.63
5.4.60.0140.11043.61
5.4.50.0120.10743.57
5.4.40.0210.11043.57
5.4.30.0160.11843.59
5.4.20.0130.11643.61
5.4.10.0130.09943.53
5.4.00.0240.09043.40
5.3.290.0240.15266.86
5.3.280.0360.14266.79
5.3.270.0340.14666.80
5.3.260.0380.17266.79
5.3.250.0400.16166.79
5.3.240.0300.15866.79
5.3.230.0300.14466.79
5.3.220.0290.15166.76
5.3.210.0310.15366.76
5.3.200.0220.15366.75
5.3.190.0210.16266.76
5.3.180.0260.15666.76
5.3.170.0190.15566.75
5.3.160.0250.15266.76
5.3.150.0290.16766.75
5.3.140.0280.17666.75
5.3.130.0330.19766.74
5.3.120.0200.15366.74
5.3.110.0280.14766.74
5.3.100.0320.14266.23
5.3.90.0230.15166.21
5.3.80.0140.16066.20
5.3.70.0260.14666.20
5.3.60.0260.14266.18
5.3.50.0230.15566.13
5.3.40.0270.14166.13
5.3.30.0290.14566.10
5.3.20.0190.15665.88
5.3.10.0230.15565.83
5.3.00.0130.15765.82
5.2.170.0210.13960.48
5.2.160.0210.14160.48
5.2.150.0200.14760.48
5.2.140.0160.15760.79
5.2.130.0280.13560.44
5.2.120.0240.14560.44
5.2.110.0330.12960.44
5.2.100.0190.14160.44
5.2.90.0160.14260.44
5.2.80.0260.12860.43
5.2.70.0150.14160.43
5.2.60.0180.14560.39
5.2.50.0110.17160.35
5.2.40.0200.17760.33
5.2.30.0250.15660.30
5.2.20.0240.23160.30
5.2.10.0310.20960.20
5.2.00.0240.20260.07
5.1.60.0280.23373.71
5.1.50.0300.22973.71
5.1.40.0310.24573.70
5.1.30.0300.27274.04
5.1.20.0250.23674.06
5.1.10.0400.22073.79
5.1.00.0270.23573.79
5.0.50.0250.24472.27
5.0.40.0270.23272.13
5.0.30.0240.25271.94
5.0.20.0340.26071.91
5.0.10.0280.25771.89
5.0.00.0270.27073.40
4.4.90.0030.0154.78
4.4.80.0040.0154.75
4.4.70.0030.0154.75
4.4.60.0030.0154.75
4.4.50.0010.0164.77
4.4.40.0040.0234.71
4.4.30.0040.0144.76
4.4.20.0050.0134.84
4.4.10.0000.0184.85
4.4.00.0030.0244.76
4.3.110.0030.0154.67
4.3.100.0030.0144.66
4.3.90.0030.0144.64
4.3.80.0010.0264.58
4.3.70.0030.0144.63
4.3.60.0050.0124.63
4.3.50.0030.0154.62
4.3.40.0040.0234.54
4.3.30.0010.0173.30
4.3.20.0050.0133.28
4.3.10.0030.0143.24
4.3.00.0170.0236.93

preferences:
40.04 ms | 401 KiB | 5 Q