3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { public $value; public function __constuct($value) { $this->value = $value; } } $array = []; for($i = 0; $i < 50000; $i++) { $array[] = md5('hallo'); $array[] = md5('bla'); } $x = new x($array); echo number_format(memory_get_usage(), 0, ',', '.'); echo "\n"; echo number_format(memory_get_usage(true), 0, ',', '.'); echo "\n"; unset($value); unset($x); echo gc_collect_cycles(); echo "\n"; echo number_format(memory_get_usage(), 0, ',', '.'); echo "\n"; echo number_format(memory_get_usage(true), 0, ',', '.');

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.3.10.0460.03926.67
7.3.00.0360.03626.21
7.2.130.0580.02926.88
7.2.120.0490.03726.87
7.2.110.0420.03426.56
7.2.100.0390.03226.55
7.2.90.0350.04226.67
7.2.80.0370.04026.63
7.2.70.0320.03826.44
7.2.60.0590.03126.89
7.2.50.0510.03326.79
7.2.40.0480.02826.15
7.2.30.0470.03826.56
7.2.20.0500.03726.62
7.2.10.0230.04326.55
7.2.00.0290.03328.11
7.1.250.0390.04525.70
7.1.70.0000.04227.11
7.1.60.0070.06827.05
7.1.50.0030.04427.25
7.1.00.0070.10732.27
7.0.200.0000.04826.83
7.0.140.0030.11331.95
7.0.110.3230.09029.10
7.0.100.3200.10329.11
7.0.90.2670.10329.11
7.0.80.2600.10029.08
7.0.70.0100.06329.04
7.0.60.0070.09029.14
7.0.50.0070.10329.04
7.0.40.0070.09023.51
7.0.30.1170.11023.50
7.0.20.1170.10323.58
7.0.10.1230.11023.60
7.0.00.1130.10023.57
5.6.280.0130.13340.52
5.6.260.0000.14040.03
5.6.250.0200.08740.09
5.6.240.0170.13340.10
5.6.230.0170.11740.26
5.6.220.0000.09039.95
5.6.210.0100.11040.07
5.6.200.0100.14040.22
5.6.190.0070.11040.10
5.6.180.0170.13739.96
5.6.170.0070.08739.95
5.6.160.0200.12739.98
5.6.150.0230.12040.05
5.6.140.0130.11339.98
5.6.130.0170.10739.95
5.6.120.0070.11339.93
5.6.110.0100.11340.04
5.6.100.0070.13339.85
5.6.90.0030.08340.03
5.6.80.0130.11339.40
5.6.70.0130.07739.33
5.6.60.0130.08339.41
5.6.50.0130.07039.42
5.6.40.0130.08739.31
5.6.30.0170.06739.42
5.6.20.0070.13039.31
5.6.10.0130.11739.41
5.6.00.0270.11039.37
5.5.380.0170.10736.96
5.5.370.0100.08036.94
5.5.360.0130.12736.92
5.5.350.0200.06736.93
5.5.340.0100.08037.50
5.5.330.0130.13737.51
5.5.320.0030.11737.54
5.5.310.0100.11737.50
5.5.300.0270.10737.50
5.5.290.0170.07037.53
5.5.280.0230.11737.51
5.5.270.0230.10737.29
5.5.260.0130.13337.37
5.5.250.0130.14037.10
5.5.240.0200.09336.68
5.5.230.0230.12036.72
5.5.220.0030.08036.85
5.5.210.0130.07336.76
5.5.200.0200.07036.70
5.5.190.0130.13036.85
5.5.180.0100.07736.86
5.5.160.0130.16336.88
5.5.150.0070.10736.65
5.5.140.0200.13736.76
5.5.130.0030.10036.88
5.5.120.0130.06736.69
5.5.110.0200.10736.88
5.5.100.0100.07036.60
5.5.90.0130.12336.66
5.5.80.0170.12336.55
5.5.70.0100.06336.69
5.5.60.0070.09036.68
5.5.50.0130.07036.63
5.5.40.0100.07736.72
5.5.30.0100.06336.77
5.5.20.0030.08336.62
5.5.10.0070.06736.72
5.5.00.0070.06736.68
5.4.450.0030.08338.79
5.4.440.0100.07738.64
5.4.430.0070.08038.71
5.4.420.0170.13738.63
5.4.410.0130.12038.79
5.4.400.0130.07738.37
5.4.390.0100.09038.36
5.4.380.0100.09038.30
5.4.370.0070.09038.34
5.4.360.0100.08738.29
5.4.350.0100.12338.30
5.4.340.0130.12038.51
5.4.320.0230.08738.34
5.4.310.0070.11038.59
5.4.300.0070.12038.34
5.4.290.0030.09038.34
5.4.280.0130.11338.68
5.4.270.0030.10338.43
5.4.260.0000.10038.43
5.4.250.0000.08738.34
5.4.240.0100.10038.34
5.4.230.0000.08738.33
5.4.220.0130.07338.46
5.4.210.0130.07338.36
5.4.200.0130.08038.50
5.4.190.0070.08738.45
5.4.180.0030.08338.50
5.4.170.0200.06038.37
5.4.160.0000.08338.34
5.4.150.0070.08738.30
5.4.140.0030.08035.77
5.4.130.0030.07735.76
5.4.120.0100.11735.79
5.4.110.0000.10335.88
5.4.100.0000.07035.71
5.4.90.0100.09335.71
5.4.80.0170.06035.74
5.4.70.0070.07735.91
5.4.60.0070.07736.00
5.4.50.0070.07735.88
5.4.40.0070.07735.74
5.4.30.0230.06335.83
5.4.20.0230.07035.87
5.4.10.0170.06735.64
5.4.00.0130.06735.20
5.3.290.0030.08014.80
5.3.280.0070.04014.45
5.3.270.0030.04014.69
5.3.260.0000.04014.60
5.3.250.0000.03314.62
5.3.240.0070.07014.62
5.3.230.0030.03714.73
5.3.220.0030.06014.56
5.3.210.0070.03314.54
5.3.200.0000.05014.52
5.3.190.0030.03714.57
5.3.180.0000.04014.69
5.3.170.0030.03714.54
5.3.160.0000.03314.58
5.3.150.0030.03714.55
5.3.140.0030.03014.59
5.3.130.0030.03714.57
5.3.120.0000.04014.52
5.3.110.0030.04014.54
5.3.100.0030.03314.04
5.3.90.0000.04314.02
5.3.80.0130.02714.02
5.3.70.0000.03713.87
5.3.60.0100.03714.03
5.3.50.0030.03714.04
5.3.40.0000.04013.90
5.3.30.0030.03313.91
5.3.20.0070.03013.72
5.3.10.0100.02013.51
5.3.00.0000.03313.66
5.2.170.0030.03312.23
5.2.160.0000.03012.23
5.2.150.0000.02712.23
5.2.140.0030.02712.23
5.2.130.0030.02312.23
5.2.120.0070.02012.23
5.2.110.0070.02012.23
5.2.100.0070.02012.23
5.2.90.0030.02312.23
5.2.80.0070.02012.23
5.2.70.0100.02012.23
5.2.60.0000.02712.23
5.2.50.0030.02312.23
5.2.40.0000.02312.23
5.2.30.0030.02712.23
5.2.20.0030.02712.23
5.2.10.0070.03312.23
5.2.00.0000.04312.23
5.1.60.0000.02312.23
5.1.50.0030.04312.23
5.1.40.0030.04012.23
5.1.30.0000.03012.23
5.1.20.0000.03012.23
5.1.10.0030.05012.23
5.1.00.0000.03712.23
5.0.50.0000.04312.23
5.0.40.0070.03012.23
5.0.30.0000.05712.23
5.0.20.0000.02312.23
5.0.10.0070.04012.23
5.0.00.0030.03712.23
4.4.90.0000.01312.23
4.4.80.0000.01312.23
4.4.70.0000.02712.23
4.4.60.0000.03712.23
4.4.50.0030.03712.23
4.4.40.0030.02312.23
4.4.30.0000.01712.23
4.4.20.0000.01712.23
4.4.10.0030.03012.23
4.4.00.0030.03712.23
4.3.110.0000.02312.23
4.3.100.0030.02012.23
4.3.90.0000.01312.23
4.3.80.0000.05712.23
4.3.70.0030.02012.23
4.3.60.0000.01712.23
4.3.50.0000.01312.23
4.3.40.0000.03012.23
4.3.30.0030.03312.23
4.3.20.0000.02012.23
4.3.10.0000.01712.23
4.3.00.0000.01312.23

preferences:
40.66 ms | 401 KiB | 5 Q