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 . $_; }))); } echo minimize(__FILE__);

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.0070.00718.68
8.3.50.0110.00821.35
8.3.40.0000.01519.09
8.3.30.0090.00619.21
8.3.20.0000.00820.34
8.3.10.0160.00320.74
8.3.00.0060.01219.63
8.2.180.0180.00416.63
8.2.170.0200.00322.96
8.2.160.0120.00620.70
8.2.150.0090.00924.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0070.01122.41
8.2.110.0090.00920.43
8.2.100.0050.00518.16
8.2.90.0060.00319.46
8.2.80.0080.00018.00
8.2.70.0000.00818.00
8.2.60.0000.00817.91
8.2.50.0040.00718.07
8.2.40.0040.00418.22
8.2.30.0000.00818.14
8.2.20.0060.00318.04
8.2.10.0000.00818.23
8.2.00.0040.00417.91
8.1.280.0110.00425.92
8.1.270.0060.00323.96
8.1.260.0090.00026.35
8.1.250.0000.00928.09
8.1.240.0000.01023.83
8.1.230.0130.00019.14
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0070.00317.73
8.1.190.0050.00317.48
8.1.180.0040.00418.10
8.1.170.0040.00418.82
8.1.160.0000.00722.18
8.1.150.0030.00519.05
8.1.140.0080.00017.57
8.1.130.0000.00717.95
8.1.120.0070.00017.62
8.1.110.0040.00717.70
8.1.100.0040.00417.64
8.1.90.0040.00417.74
8.1.80.0050.00217.61
8.1.70.0000.00717.51
8.1.60.0030.00617.73
8.1.50.0030.00617.85
8.1.40.0050.00317.79
8.1.30.0030.00617.86
8.1.20.0000.00817.87
8.1.10.0080.00017.94
8.1.00.0000.00817.84
8.0.300.0000.00918.77
8.0.290.0040.00417.00
8.0.280.0030.00418.63
8.0.270.0000.00717.36
8.0.260.0000.00717.46
8.0.250.0030.00417.23
8.0.240.0000.00717.13
8.0.230.0000.00717.23
8.0.220.0030.00317.25
8.0.210.0070.00017.09
8.0.200.0060.00017.25
8.0.190.0050.00317.25
8.0.180.0000.00717.23
8.0.170.0050.00317.29
8.0.160.0070.00017.14
8.0.150.0000.00817.24
8.0.140.0040.00417.19
8.0.130.0000.00613.69
8.0.120.0000.00817.20
8.0.110.0040.00417.09
8.0.100.0080.00017.07
8.0.90.0040.00417.24
8.0.80.0060.01217.21
8.0.70.0020.00517.21
8.0.60.0000.00817.27
8.0.50.0000.00717.14
8.0.30.0100.01017.35
8.0.20.0100.00917.52
8.0.10.0040.00417.30
8.0.00.0120.00717.13
7.4.330.0000.00515.11
7.4.320.0030.00316.83
7.4.300.0040.00416.82
7.4.290.0000.00816.89
7.4.280.0040.00416.92
7.4.270.0070.00016.84
7.4.260.0000.00716.80
7.4.250.0000.00816.80
7.4.240.0040.00416.89
7.4.230.0000.00716.92
7.4.220.0100.00916.87
7.4.210.0120.00316.73
7.4.200.0000.00716.98
7.4.160.0100.00616.82
7.4.150.0070.01117.40
7.4.140.0120.00717.86
7.4.130.0090.01016.93
7.4.120.0100.01016.88
7.4.110.0150.00317.04
7.4.100.0030.01416.98
7.4.90.0140.00716.83
7.4.80.0090.01219.39
7.4.70.0140.00616.97
7.4.60.0030.01417.04
7.4.50.0000.00416.69
7.4.40.0100.00716.65
7.4.30.0150.00916.94
7.4.10.0050.01415.23
7.4.00.0040.01115.18
7.3.330.0030.00313.65
7.3.320.0030.00313.63
7.3.310.0050.00216.58
7.3.300.0030.00316.67
7.3.290.0160.00316.64
7.3.280.0020.01416.62
7.3.270.0120.01217.40
7.3.260.0120.00916.80
7.3.250.0080.00916.68
7.3.240.0070.01116.96
7.3.230.0150.00316.66
7.3.210.0070.01116.71
7.3.200.0120.01119.39
7.3.190.0150.00316.73
7.3.180.0090.00616.74
7.3.170.0070.01716.77
7.3.160.0100.01016.70
7.3.130.0050.01415.23
7.3.120.0070.01115.13
7.3.110.0050.01414.86
7.3.100.0060.00815.08
7.3.90.0070.00515.18
7.3.80.0110.00515.12
7.3.70.0030.01014.99
7.3.60.0020.00915.08
7.3.50.0050.01015.13
7.3.40.0010.01515.06
7.3.30.0070.00714.99
7.3.20.0040.01016.80
7.3.10.0080.00316.63
7.3.00.0050.00916.94
7.2.330.0060.01216.92
7.2.320.0130.00917.05
7.2.310.0150.00417.02
7.2.300.0050.01117.04
7.2.290.0040.01316.89
7.2.260.0080.00915.35
7.2.250.0080.01115.25
7.2.240.0070.00815.44
7.2.230.0080.00915.31
7.2.220.0070.01015.27
7.2.210.0030.00715.34
7.2.200.0050.01015.12
7.2.190.0070.00815.39
7.2.180.0030.01215.33
7.2.170.0030.01115.48
7.2.160.0070.00915.45
7.2.150.0060.00817.24
7.2.140.0060.00817.09
7.2.130.0030.01517.21
7.2.120.0080.00317.09
7.2.110.0080.00917.06
7.2.100.0060.00917.13
7.2.90.0020.01217.23
7.2.80.0060.00917.19
7.2.70.0110.00617.25
7.2.60.0080.00517.06
7.2.50.0050.01117.29
7.2.40.0060.00617.32
7.2.30.0050.00817.02
7.2.20.0080.00517.28
7.2.10.0080.00617.26
7.2.00.0080.00718.04
7.1.330.0090.00515.85
7.1.320.0060.00716.11
7.1.310.0050.00616.15
7.1.300.0060.00616.00
7.1.290.0060.00616.00
7.1.280.0020.01116.15
7.1.270.0020.01215.87
7.1.260.0050.00516.10
7.1.250.0090.00716.16
7.1.240.0030.00816.05
7.1.230.0070.00715.96
7.1.220.0070.00616.09
7.1.210.0040.00715.86
7.1.200.0060.01016.04
7.1.190.0050.00616.00
7.1.180.0050.01116.00
7.1.170.0080.00515.94
7.1.160.0050.00715.93
7.1.150.0120.00316.15
7.1.140.0050.00816.10
7.1.130.0030.01016.15
7.1.120.0060.00916.03
7.1.110.0120.00316.17
7.1.100.0040.00716.83
7.1.90.0040.00816.15
7.1.80.0000.01016.00
7.1.70.0080.00516.50
7.1.60.0070.00817.09
7.1.50.0100.00922.43
7.1.40.0090.00416.14
7.1.30.0050.00616.12
7.1.20.0040.01015.85
7.1.10.0050.00716.00
7.1.00.0070.02918.08
7.0.330.0000.01115.39
7.0.320.0050.01115.70
7.0.310.0020.00815.67
7.0.300.0060.00315.63
7.0.290.0050.00515.65
7.0.280.0060.00615.58
7.0.270.0030.01015.67
7.0.260.0040.01315.67
7.0.250.0060.00615.69
7.0.240.0090.00415.55
7.0.230.0100.00615.74
7.0.220.0050.00515.76
7.0.210.0070.00415.79
7.0.200.0030.00816.21
7.0.190.0040.00715.79
7.0.180.0060.00615.50
7.0.170.0060.00615.62
7.0.160.0070.00515.64
7.0.150.0030.00715.49
7.0.140.0070.02817.81
7.0.130.0020.00915.48
7.0.120.0110.00215.60
7.0.110.0070.00515.65
7.0.100.0050.00815.64
7.0.90.0080.00415.56
7.0.80.0020.01315.49
7.0.70.0060.00715.73
7.0.60.0020.02216.98
7.0.50.0070.01716.53
7.0.40.0070.02615.77
7.0.30.0250.02715.82
7.0.20.0140.03215.85
7.0.10.0160.03015.79
7.0.00.0040.03615.83
5.6.400.0020.00914.61
5.6.390.0090.00614.85
5.6.380.0040.00914.51
5.6.370.0020.01214.63
5.6.360.0030.01114.74
5.6.350.0070.00614.88
5.6.340.0060.00714.59
5.6.330.0070.00714.75
5.6.320.0030.00914.53
5.6.310.0030.01014.54
5.6.300.0130.00214.68
5.6.290.0030.00914.73
5.6.280.0060.02916.80
5.6.270.0080.00614.70
5.6.260.0050.00914.81
5.6.250.0030.01214.40
5.6.240.0030.00714.70
5.6.230.0090.00914.64
5.6.220.0070.00814.76
5.6.210.0040.02116.56
5.6.200.0080.01715.90
5.6.190.0070.03316.46
5.6.180.1390.01516.68
5.6.170.0140.02316.62
5.6.160.0050.03416.49
5.6.150.0030.02615.72
5.6.140.0050.01815.85
5.6.130.0030.03615.90
5.6.120.0080.02816.80
5.6.110.0140.02516.92
5.6.100.0090.02716.75
5.6.90.0090.02916.88
5.6.80.0100.02916.60
5.6.70.1160.01516.51
5.6.60.0100.00314.64
5.6.50.0020.01214.65
5.6.40.0020.01414.41
5.6.30.0050.00814.40
5.6.20.0070.00914.75
5.6.10.0020.00814.50
5.6.00.0060.01014.54
5.5.380.0080.00514.64
5.5.370.0080.00814.27
5.5.360.0040.00814.69
5.5.350.0110.02816.46
5.5.340.0090.01615.75
5.5.330.0040.03616.32
5.5.320.0130.01516.40
5.5.310.0170.02816.52
5.5.300.0060.03315.46
5.5.290.0020.02215.53
5.5.280.0060.03316.62
5.5.270.0070.02216.77
5.5.260.0080.03116.57
5.5.250.0070.03016.48
5.5.240.0040.03416.31
5.5.230.0110.00514.38
5.5.220.0090.00614.17
5.5.210.0110.00514.36
5.5.200.0060.01014.38
5.5.190.0040.00614.47
5.5.180.0090.00314.35
5.5.170.0070.00514.30
5.5.160.0060.00814.42
5.5.150.0070.00814.47
5.5.140.0090.00914.48
5.5.130.0050.00614.39
5.5.120.0050.01014.26
5.5.110.0050.01314.25
5.5.100.0040.01014.38
5.5.90.0030.01214.32
5.5.80.0100.00314.38
5.5.70.0040.00914.48
5.5.60.0050.00614.31
5.5.50.0030.01114.28
5.5.40.0060.00814.17
5.5.30.0030.00814.57
5.5.20.0100.00314.46
5.5.10.0110.00314.49
5.5.00.0030.01014.42
5.4.450.0130.02415.04
5.4.440.0200.02415.10
5.4.430.0170.02315.05
5.4.420.0180.02615.04
5.4.410.0160.01815.05
5.4.400.0180.01914.93
5.4.390.0130.01814.90
5.4.380.0150.01514.94
5.4.370.0190.01814.99
5.4.360.0190.01914.93
5.4.350.0180.02014.94
5.4.340.0170.02914.93
5.4.330.0060.00312.86
5.4.320.0190.02614.90
5.4.310.0200.02814.89
5.4.300.0180.02614.99
5.4.290.0170.02214.94
5.4.280.0230.02414.95
5.4.270.0140.01814.98
5.4.260.0190.01514.95
5.4.250.0180.02914.98
5.4.240.0210.01914.89
5.4.230.0170.01514.91
5.4.220.0240.01414.89
5.4.210.0160.02014.86
5.4.200.0180.01615.01
5.4.190.0130.02515.01
5.4.180.0180.02814.90
5.4.170.0180.02014.85
5.4.160.0210.02314.85
5.4.150.0170.02714.89
5.4.140.0180.02314.03
5.4.130.0170.01714.04
5.4.120.0190.02514.03
5.4.110.0150.01714.04
5.4.100.0160.01914.04
5.4.90.0140.01714.06
5.4.80.0130.01914.07
5.4.70.0170.02914.10
5.4.60.0160.01614.07
5.4.50.0180.02314.10
5.4.40.0200.02114.10
5.4.30.0210.02414.05
5.4.20.0140.01714.07
5.4.10.0200.02314.10
5.4.00.0180.02613.87
5.3.290.0430.06714.82
5.3.280.0430.06714.61
5.3.270.0530.06314.77
5.3.260.0400.04014.51
5.3.250.0470.06314.62
5.3.240.0470.05014.58
5.3.230.0370.03714.52
5.3.220.0430.06014.66
5.3.210.0470.06314.69
5.3.200.0400.04314.48
5.3.190.0500.06314.57
5.3.180.0330.04014.59
5.3.170.0370.03314.71
5.3.160.0400.03314.79
5.3.150.0470.06314.58
5.3.140.0470.06314.46
5.3.130.0470.03714.63
5.3.120.0330.03714.57
5.3.110.0400.06714.63
5.3.100.0470.05713.97
5.3.90.0470.06313.95
5.3.80.0430.04014.11
5.3.70.0400.04014.03
5.3.60.0370.03013.92
5.3.50.0300.04014.03
5.3.40.0230.07714.07
5.3.30.0370.04313.93
5.3.20.0470.05713.92
5.3.10.0470.04713.67
5.3.00.0370.03713.81
5.2.170.0300.05013.13
5.2.160.0300.03713.13
5.2.150.0330.03713.13
5.2.140.0330.06013.13
5.2.130.0370.05713.13
5.2.120.0330.04013.13
5.2.110.0330.05013.13
5.2.100.0200.04013.13
5.2.90.0370.05713.13
5.2.80.0430.05313.13
5.2.70.0370.05713.13
5.2.60.0330.03013.13
5.2.50.0370.03313.13
5.2.40.0270.05313.13
5.2.30.0270.03313.13
5.2.20.0300.05713.13
5.2.10.0200.04013.13
5.2.00.0400.04313.13
5.1.60.0300.04713.13
5.1.50.0330.02713.13
5.1.40.0300.04313.13
5.1.30.0330.04313.13
5.1.20.0330.05013.13
5.1.10.0270.03313.13
5.1.00.0270.03013.13
5.0.50.0170.04313.13
5.0.40.0130.04313.13
5.0.30.0200.04713.13
5.0.20.0170.02313.13
5.0.10.0130.04013.13
5.0.00.0130.03713.13
4.4.90.0170.01313.13
4.4.80.0130.01713.13
4.4.70.0130.02313.13
4.4.60.0130.01313.13
4.4.50.0130.02713.13
4.4.40.0130.03713.13
4.4.30.0170.03313.13
4.4.20.0200.01713.13
4.4.10.0130.03013.13
4.4.00.0170.03313.13
4.3.110.0130.03713.13
4.3.100.0200.02013.13
4.3.90.0170.01713.13
4.3.80.0170.05013.13
4.3.70.0170.03313.13
4.3.60.0130.02013.13
4.3.50.0170.02013.13
4.3.40.0130.03013.13
4.3.30.0100.03013.13
4.3.20.0070.02313.13
4.3.10.0100.03013.13
4.3.00.0130.03013.13

preferences:
44.87 ms | 401 KiB | 5 Q