3v4l.org

run code in 300+ PHP versions simultaneously
<?php function minimize($file) { return preg_replace('#(<\?php)\s+#S','$1 ',preg_replace('#\s*([(){}[\];,.:+<>*/%^=&?|$-])\s*#S', '$1', array_reduce(token_get_all(php_strip_whitespace($file)),function($c,$x){ static $s = [], $i=0; if ( is_string($x) ) return $c . $x; $_ = $x[1]; if ( $x[0] == 310 ) return $c . (defined($_) ? (is_bool($k=constant($_))||is_null($k)?$_:$k) : $_); if ( $x[0] == 312 ) return $c . (empty($s[$_]) ? ($s[$_] = '$_' . base_convert($i++,10,36)) : $s[$_]); if ( $x[0] == 263 ) return $c . '||'; if ( $x[0] == 265 ) return $c . '&&'; return $c . $_; }))); }

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.0100.01018.18
8.3.50.0120.01021.09
8.3.40.0070.00718.72
8.3.30.0100.01019.10
8.3.20.0040.00420.25
8.3.10.0050.00320.40
8.3.00.0040.01519.13
8.2.180.0090.00916.38
8.2.170.0070.01122.96
8.2.160.0070.00720.37
8.2.150.0110.00424.18
8.2.140.0080.00024.66
8.2.130.0100.00326.16
8.2.120.0030.00522.07
8.2.110.0030.00620.36
8.2.100.0080.00417.80
8.2.90.0040.00419.10
8.2.80.0000.00817.97
8.2.70.0070.00317.13
8.2.60.0030.00617.78
8.2.50.0030.00618.07
8.2.40.0050.00317.78
8.2.30.0070.00018.01
8.2.20.0040.00417.64
8.2.10.0040.00418.01
8.2.00.0050.00217.66
8.1.280.0080.01125.92
8.1.270.0030.00623.84
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00723.92
8.1.230.0100.00019.04
8.1.220.0070.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0030.00517.10
8.1.180.0060.00318.10
8.1.170.0080.00018.64
8.1.160.0080.00021.86
8.1.150.0000.00818.78
8.1.140.0000.00717.34
8.1.130.0030.00317.75
8.1.120.0070.00017.37
8.1.110.0070.00317.21
8.1.100.0000.00717.34
8.1.90.0040.00417.24
8.1.80.0000.00717.23
8.1.70.0000.00717.33
8.1.60.0040.00417.35
8.1.50.0050.00317.41
8.1.40.0040.00417.32
8.1.30.0000.00917.48
8.1.20.0050.00217.53
8.1.10.0000.00717.30
8.1.00.0000.00817.38
8.0.300.0060.00318.77
8.0.290.0090.00016.63
8.0.280.0030.00318.38
8.0.270.0000.00817.09
8.0.260.0030.00317.16
8.0.250.0040.00416.78
8.0.240.0070.00016.86
8.0.230.0070.00016.83
8.0.220.0000.00716.78
8.0.210.0000.00716.82
8.0.200.0030.00316.84
8.0.190.0050.00516.72
8.0.180.0080.00016.72
8.0.170.0080.00016.67
8.0.160.0000.00716.84
8.0.150.0000.00716.71
8.0.140.0000.00716.78
8.0.130.0030.00313.11
8.0.120.0070.00016.80
8.0.110.0050.00216.72
8.0.100.0040.00416.73
8.0.90.0070.00016.68
8.0.80.0030.01216.84
8.0.70.0000.00716.60
8.0.60.0000.00816.60
8.0.50.0070.00016.61
8.0.30.0100.01216.95
8.0.20.0130.00517.40
8.0.10.0000.00716.78
8.0.00.0100.00916.57
7.4.330.0000.00515.00
7.4.320.0040.00416.53
7.4.300.0060.00016.34
7.4.290.0040.00216.48
7.4.280.0030.00316.53
7.4.270.0030.00316.39
7.4.260.0030.00316.46
7.4.250.0070.00016.34
7.4.240.0030.00416.51
7.4.230.0020.00516.59
7.4.220.0100.01016.52
7.4.210.0070.00716.52
7.4.200.0080.00016.45
7.4.160.0060.01016.39
7.4.150.0130.00617.40
7.4.140.0130.00817.86
7.4.130.0080.01216.42
7.4.120.0070.01016.30
7.4.110.0030.01316.28
7.4.100.0100.00716.39
7.4.90.0080.00816.21
7.4.80.0060.01219.39
7.4.70.0070.01016.22
7.4.60.0040.01216.24
7.4.50.0050.00316.47
7.4.40.0140.00316.30
7.4.30.0110.00616.29
7.4.10.0030.01315.08
7.4.00.0060.01014.91
7.3.330.0050.00013.19
7.3.320.0050.00013.19
7.3.310.0050.00216.00
7.3.300.0070.00016.13
7.3.290.0000.01416.21
7.3.280.0040.01316.20
7.3.270.0040.01617.40
7.3.260.0100.00716.30
7.3.250.0070.01016.24
7.3.240.0100.00716.20
7.3.230.0060.00916.39
7.3.210.0080.00816.22
7.3.200.0040.01619.39
7.3.190.0100.01016.52
7.3.180.0090.00916.33
7.3.170.0100.00616.46
7.3.160.0100.01316.43
7.3.130.0160.00014.56
7.3.120.0080.01014.71
7.3.110.0050.01214.55
7.3.100.0060.00914.68
7.3.90.0050.00914.76
7.3.80.0030.00814.74
7.3.70.0070.00514.67
7.3.60.0020.00614.63
7.3.50.0060.00514.66
7.3.40.0060.00914.58
7.3.30.0060.00814.68
7.3.20.0040.00916.45
7.3.10.0060.00816.43
7.3.00.0050.00716.47
7.2.330.0130.00316.50
7.2.320.0090.00616.52
7.2.310.0070.01016.67
7.2.300.0070.01016.53
7.2.290.0190.00016.32
7.2.260.0080.00315.04
7.2.250.0080.01014.78
7.2.240.0090.00815.04
7.2.230.0040.00914.96
7.2.220.0080.00315.01
7.2.210.0050.01114.84
7.2.200.0030.01014.82
7.2.190.0050.01014.83
7.2.180.0050.01014.82
7.2.170.0050.00914.84
7.2.160.0070.00814.80
7.2.150.0030.00716.75
7.2.140.0050.01016.50
7.2.130.0030.01116.72
7.2.120.0070.00716.61
7.2.110.0070.00916.62
7.2.100.0090.00516.82
7.2.90.0070.00916.76
7.2.80.0080.00716.70
7.2.70.0070.01116.70
7.2.60.0070.01016.63
7.2.50.0030.01116.68
7.2.40.0050.00816.70
7.2.30.0070.00516.54
7.2.20.0060.00816.67
7.2.10.0070.00916.85
7.2.00.0060.01017.26
7.1.330.0050.01015.74
7.1.320.0050.01015.70
7.1.310.0100.00515.67
7.1.300.0070.00715.45
7.1.290.0060.00715.73
7.1.280.0090.00515.53
7.1.270.0030.01015.51
7.1.260.0050.00915.53
7.1.250.0070.00615.70
7.1.240.0080.00715.62
7.1.230.0040.00715.68
7.1.220.0070.00315.54
7.1.210.0070.00515.46
7.1.200.0030.01015.56
7.1.190.0050.00915.54
7.1.180.0060.00615.61
7.1.170.0040.00715.52
7.1.160.0050.00915.48
7.1.150.0030.00915.42
7.1.140.0020.01315.48
7.1.130.0020.01215.61
7.1.120.0070.00715.67
7.1.110.0020.00915.62
7.1.100.0050.00916.14
7.1.90.0090.00715.66
7.1.80.0020.00715.55
7.1.70.0040.00916.05
7.1.60.0050.00916.09
7.1.50.0110.01022.01
7.1.40.0020.01015.59
7.1.30.0000.01215.57
7.1.20.0080.00615.64
7.1.10.0090.00515.48
7.1.00.0070.02917.96
7.0.330.0060.00515.22
7.0.320.0050.00715.24
7.0.310.0070.00715.30
7.0.300.0090.00415.17
7.0.290.0050.00315.18
7.0.280.0040.00715.13
7.0.270.0130.00315.17
7.0.260.0060.00615.33
7.0.250.0030.00815.24
7.0.240.0070.00615.34
7.0.230.0070.00615.22
7.0.220.0070.00315.11
7.0.210.0110.00315.19
7.0.200.0050.00915.71
7.0.190.0090.00215.32
7.0.180.0030.01315.12
7.0.170.0030.01115.11
7.0.160.0060.00615.36
7.0.150.0020.01015.30
7.0.140.0090.02517.49
7.0.130.0040.00415.38
7.0.120.0050.00615.37
7.0.110.0080.00515.25
7.0.100.0020.00715.17
7.0.90.0030.00615.31
7.0.80.0040.00915.30
7.0.70.1570.02116.91
7.0.60.0110.02716.79
7.0.50.0070.02916.13
7.0.40.0090.03115.50
7.0.30.0310.02415.71
7.0.20.0120.02715.51
7.0.10.0110.02415.46
7.0.00.0070.03315.61
5.6.400.0030.01114.17
5.6.390.0030.01014.28
5.6.380.0020.01214.21
5.6.370.0060.00614.08
5.6.360.0060.00814.25
5.6.350.0020.00814.28
5.6.340.0020.01114.07
5.6.330.0090.00514.00
5.6.320.0020.01214.41
5.6.310.0070.00714.21
5.6.300.0050.01114.33
5.6.290.0090.00514.31
5.6.280.0080.02516.42
5.6.270.0060.00814.34
5.6.260.0050.00714.11
5.6.250.0000.01014.23
5.6.240.0060.00614.19
5.6.230.0070.00714.24
5.6.220.0030.00914.09
5.6.210.0030.03416.21
5.6.200.0020.03615.41
5.6.190.0060.02016.21
5.6.180.0090.02816.25
5.6.170.0170.02716.19
5.6.160.0050.02416.20
5.6.150.0050.02815.53
5.6.140.0020.03415.43
5.6.130.0050.02215.47
5.6.120.0020.02016.51
5.6.110.0080.03216.31
5.6.100.0060.02516.37
5.6.90.0040.03416.33
5.6.80.0080.03116.13
5.6.70.0090.02116.24
5.6.60.0040.00913.95
5.6.50.0140.00214.11
5.6.40.0060.00313.96
5.6.30.0080.00513.91
5.6.20.0020.01114.08
5.6.10.0060.00513.89
5.6.00.0050.00914.11
5.5.380.0060.00714.22
5.5.370.0050.00714.01
5.5.360.0070.00713.96
5.5.350.0020.03316.17
5.5.340.0060.02115.54
5.5.330.0090.03016.25
5.5.320.0090.02716.24
5.5.310.0140.02816.20
5.5.300.0020.03615.30
5.5.290.0050.03315.32
5.5.280.0050.03116.20
5.5.270.0050.02216.25
5.5.260.0120.02816.27
5.5.250.0050.03016.23
5.5.240.0070.03016.12
5.5.230.0050.00714.07
5.5.220.0050.00714.03
5.5.210.0060.00914.10
5.5.200.0070.00313.98
5.5.190.0040.01014.03
5.5.180.0040.00514.00
5.5.170.0040.00913.98
5.5.160.0040.00714.11
5.5.150.0070.00713.92
5.5.140.0030.00814.00
5.5.130.0040.00913.97
5.5.120.0030.01113.89
5.5.110.0020.00913.96
5.5.100.0060.00713.97
5.5.90.0030.01013.88
5.5.80.0030.00914.04
5.5.70.0060.00813.87
5.5.60.0090.00313.86
5.5.50.0030.00713.85
5.5.40.0050.00813.70
5.5.30.0060.00614.03
5.5.20.0050.00514.07
5.5.10.0100.00313.89
5.5.00.0040.01013.86
5.4.450.0020.02714.16
5.4.440.0100.02114.17
5.4.430.0080.02314.04
5.4.420.0250.00314.09
5.4.410.0240.00614.17
5.4.400.0260.00314.00
5.4.390.0230.00414.01
5.4.380.0270.00214.02
5.4.370.0210.00714.05
5.4.360.0250.00214.00
5.4.350.0260.00214.03
5.4.340.0260.00014.01
5.4.330.0050.00311.46
5.4.320.0050.01511.81
5.4.310.0020.02011.81
5.4.300.0060.01411.81
5.4.290.0040.01911.81
5.4.280.0050.01611.78
5.4.270.0040.01711.78
5.4.260.0040.01611.78
5.4.250.0040.01611.78
5.4.240.0050.01611.78
5.4.230.0060.01611.77
5.4.220.0070.01411.78
5.4.210.0020.01711.78
5.4.200.0020.01911.78
5.4.190.0040.02011.78
5.4.180.0060.01511.78
5.4.170.0060.01411.78
5.4.160.0050.01511.78
5.4.150.0040.01611.78
5.4.140.0040.01711.67
5.4.130.0010.02111.67
5.4.120.0040.01611.65
5.4.110.0030.01711.65
5.4.100.0030.01711.65
5.4.90.0060.01611.65
5.4.80.0050.01511.65
5.4.70.0060.01411.65
5.4.60.0050.01511.65
5.4.50.0030.01911.65
5.4.40.0030.01611.64
5.4.30.0030.01711.64
5.4.20.0030.01711.64
5.4.10.0070.01411.64
5.4.00.0030.01711.47
5.3.290.0080.03712.80
5.3.280.0080.03612.71
5.3.270.0070.04712.73
5.3.260.0090.04012.72
5.3.250.0070.03512.72
5.3.240.0060.03812.71
5.3.230.0090.03612.71
5.3.220.0090.03612.68
5.3.210.0060.03812.68
5.3.200.0070.03512.68
5.3.190.0100.03312.68
5.3.180.0050.03812.68
5.3.170.0020.04112.66
5.3.160.0070.03912.67
5.3.150.0120.04812.68
5.3.140.0050.03912.66
5.3.130.0030.04212.66
5.3.120.0110.03312.65
5.3.110.0030.04112.66
5.3.100.0090.04312.13
5.3.90.0070.03712.11
5.3.80.0060.04512.10
5.3.70.0060.04212.10
5.3.60.0060.03812.09
5.3.50.0050.03712.03
5.3.40.0060.03712.03
5.3.30.0060.04011.98
5.3.20.0050.05011.77
5.3.10.0080.04011.74
5.3.00.0060.04411.73
5.2.170.0040.0329.21
5.2.160.0080.0389.21
5.2.150.0070.0369.21
5.2.140.0050.0339.21
5.2.130.0050.0369.17
5.2.120.0030.0329.17
5.2.110.0020.0329.18
5.2.100.0040.0299.18
5.2.90.0050.0289.18
5.2.80.0040.0309.17
5.2.70.0080.0319.17
5.2.60.0060.0329.12
5.2.50.0050.0359.09
5.2.40.0050.0339.07
5.2.30.0060.0309.04
5.2.20.0060.0299.04
5.2.10.0050.0308.95
5.2.00.0110.0338.80
5.1.60.0070.0328.09
5.1.50.0030.0388.09
5.1.40.0070.0308.07
5.1.30.0070.0298.42
5.1.20.0050.0278.43
5.1.10.0080.0328.17
5.1.00.0040.0298.17
5.0.50.0040.0296.64
5.0.40.0040.0286.51
5.0.30.0060.0296.31
5.0.20.0030.0206.29
5.0.10.0060.0176.26
5.0.00.0020.0406.26
4.4.90.0050.0204.78
4.4.80.0040.0204.76
4.4.70.0050.0194.75
4.4.60.0020.0224.75
4.4.50.0040.0154.77
4.4.40.0060.0274.71
4.4.30.0020.0214.76
4.4.20.0060.0174.85
4.4.10.0020.0164.85
4.4.00.0030.0264.76
4.3.110.0020.0214.67
4.3.100.0040.0144.67
4.3.90.0040.0134.64
4.3.80.0070.0204.58
4.3.70.0050.0164.63
4.3.60.0030.0184.63
4.3.50.0020.0184.62
4.3.40.0040.0304.54
4.3.30.0000.0213.30
4.3.20.0010.0183.28
4.3.10.0050.0153.25
4.3.00.0000.01716.50

preferences:
40.56 ms | 401 KiB | 5 Q