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 . $_; }))); } 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.0090.00618.43
8.3.50.0120.00721.33
8.3.40.0060.01018.92
8.3.30.0040.01119.17
8.3.20.0040.00420.19
8.3.10.0030.01320.68
8.3.00.0060.00319.51
8.2.180.0090.01216.88
8.2.170.0040.01922.96
8.2.160.0030.01720.58
8.2.150.0110.00724.18
8.2.140.0130.00624.66
8.2.130.0030.00526.16
8.2.120.0040.00422.23
8.2.110.0030.00720.50
8.2.100.0090.00318.28
8.2.90.0000.00819.25
8.2.80.0040.00417.97
8.2.70.0060.00317.87
8.2.60.0000.00817.91
8.2.50.0050.00518.07
8.2.40.0000.00818.34
8.2.30.0040.00418.23
8.2.20.0050.00317.79
8.2.10.0030.00618.28
8.2.00.0050.00317.89
8.1.280.0220.00025.92
8.1.270.0060.00324.02
8.1.260.0030.00626.35
8.1.250.0030.00628.09
8.1.240.0100.00723.96
8.1.230.0060.00619.09
8.1.220.0080.00017.76
8.1.210.0050.00318.77
8.1.200.0030.00617.73
8.1.190.0050.00517.47
8.1.180.0050.00318.10
8.1.170.0000.00818.96
8.1.160.0040.00422.01
8.1.150.0070.00019.01
8.1.140.0000.00817.70
8.1.130.0030.00517.96
8.1.120.0040.00417.63
8.1.110.0060.00317.56
8.1.100.0050.00217.61
8.1.90.0040.00417.72
8.1.80.0050.00217.64
8.1.70.0000.00717.64
8.1.60.0060.00317.89
8.1.50.0060.00317.73
8.1.40.0050.00317.71
8.1.30.0100.00018.01
8.1.20.0060.00317.99
8.1.10.0000.00817.84
8.1.00.0000.00817.70
8.0.300.0000.00718.77
8.0.290.0070.00017.00
8.0.280.0000.00718.61
8.0.270.0080.00017.49
8.0.260.0030.00317.37
8.0.250.0000.00717.27
8.0.240.0030.00317.24
8.0.230.0050.00217.16
8.0.220.0030.00317.16
8.0.210.0000.00717.16
8.0.200.0000.00617.29
8.0.190.0000.01017.25
8.0.180.0040.00417.09
8.0.170.0000.00817.24
8.0.160.0080.00017.10
8.0.150.0000.00817.09
8.0.140.0030.00517.21
8.0.130.0000.00613.59
8.0.120.0040.00417.16
8.0.110.0040.00417.21
8.0.100.0000.00717.17
8.0.90.0000.00817.25
8.0.80.0130.01017.16
8.0.70.0080.00017.27
8.0.60.0000.00717.16
8.0.50.0000.00817.29
8.0.30.0050.01517.20
8.0.20.0090.01017.40
8.0.10.0040.00417.16
8.0.00.0110.01117.13
7.4.330.0020.00215.11
7.4.320.0000.00716.89
7.4.300.0000.00616.89
7.4.290.0040.00416.73
7.4.280.0040.00416.89
7.4.270.0000.00716.96
7.4.260.0030.00316.94
7.4.250.0000.00716.86
7.4.240.0020.00516.82
7.4.230.0000.00716.71
7.4.220.0060.01816.91
7.4.210.0080.01016.95
7.4.200.0040.00316.74
7.4.160.0120.00416.87
7.4.150.0060.01217.40
7.4.140.0090.01217.86
7.4.130.0080.01216.96
7.4.120.0120.00516.79
7.4.110.0120.00617.00
7.4.100.0120.00616.95
7.4.90.0070.01516.84
7.4.80.0150.00619.39
7.4.70.0120.00616.91
7.4.60.0100.00717.00
7.4.50.0050.00316.82
7.4.40.0180.00016.77
7.4.30.0090.00916.74
7.4.00.0100.00715.34
7.3.330.0000.00613.52
7.3.320.0050.00013.54
7.3.310.0000.00716.70
7.3.300.0030.00316.57
7.3.290.0060.00816.62
7.3.280.0100.00816.62
7.3.270.0130.00717.40
7.3.260.0070.01116.88
7.3.250.0120.01016.66
7.3.240.0180.00016.96
7.3.230.0170.00016.59
7.3.210.0120.00616.75
7.3.200.0180.00819.39
7.3.190.0070.01416.76
7.3.180.0130.00316.71
7.3.170.0120.00616.76
7.3.160.0070.01116.92
7.2.330.0070.01117.07
7.2.320.0060.01716.96
7.2.310.0130.00616.95
7.2.300.0120.00417.00
7.2.290.0060.01116.99
7.2.00.0040.01119.62
7.1.200.0100.00316.18
7.1.100.0100.00318.06
7.1.70.0090.00917.41
7.1.60.0070.01319.32
7.1.50.0220.00935.19
7.1.00.0000.07722.60
7.0.200.0000.00917.07
7.0.140.0000.07722.00
7.0.60.0030.08020.12
7.0.50.0170.07317.99
7.0.40.0030.05020.29
7.0.30.0270.08720.19
7.0.20.0230.09020.08
7.0.10.0170.04320.21
7.0.00.0100.07720.13
5.6.280.0000.07721.12
5.6.210.0170.07720.55
5.6.200.0130.06318.27
5.6.190.0070.08720.77
5.6.180.0170.04720.73
5.6.170.0230.08320.56
5.6.160.0000.04320.55
5.6.150.0030.08318.19
5.6.140.0000.05018.22
5.6.130.0070.08718.22
5.6.120.0100.05021.16
5.6.110.0100.08321.01
5.6.100.0030.07720.93
5.6.90.0070.08021.03
5.6.80.0100.08020.42
5.6.70.4570.03320.41
5.5.350.0130.04720.39
5.5.340.0130.06318.01
5.5.330.0070.05320.22
5.5.320.0370.07720.25
5.5.310.0300.06720.50
5.5.300.0030.05018.07
5.5.290.0070.07717.99
5.5.280.0000.04720.92
5.5.270.0030.07720.72
5.5.260.0100.04720.89
5.5.250.0100.07320.66
5.5.240.0400.05320.31
5.4.450.0770.06019.29
5.4.440.0930.06019.55
5.4.430.0730.06019.48
5.4.420.0630.00019.46
5.4.410.0630.00019.41
5.4.400.0630.00019.07
5.4.390.0630.00019.27
5.4.380.0670.00019.21
5.4.370.0630.00018.99
5.4.360.0630.00019.13
5.4.350.0670.00019.13
5.4.340.0670.00019.27
5.4.320.0100.04512.69
5.4.310.0090.05112.68
5.4.300.0070.04912.69
5.4.290.0090.05112.69
5.4.280.0090.03412.58
5.4.270.0040.04612.58
5.4.260.0070.03912.59
5.4.250.0110.03412.58
5.4.240.0070.04312.59
5.4.230.0050.03912.57
5.4.220.0040.03812.58
5.4.210.0060.04312.57
5.4.200.0080.03812.57
5.4.190.0130.03412.57
5.4.180.0090.03512.57
5.4.170.0050.04112.58
5.4.160.0120.03912.57
5.4.150.0080.03612.57
5.4.140.0130.04012.26
5.4.130.0080.04012.24
5.4.120.0060.03412.20
5.4.110.0080.03412.20
5.4.100.0080.03512.20
5.4.90.0060.03912.20
5.4.80.0140.03112.20
5.4.70.0050.03812.19
5.4.60.0060.03812.20
5.4.50.0050.03612.19
5.4.40.0030.04612.18
5.4.30.0080.04612.18
5.4.20.0030.03812.18
5.4.10.0030.03812.18
5.4.00.0050.03611.67
5.3.290.0050.04012.80
5.3.280.0050.03912.71
5.3.270.0050.04312.72
5.3.260.0100.04312.72
5.3.250.0060.04212.72
5.3.240.0060.03712.72
5.3.230.0050.04012.71
5.3.220.0090.03612.68
5.3.210.0050.03912.68
5.3.200.0040.03812.68
5.3.190.0090.03512.68
5.3.180.0090.03812.67
5.3.170.0060.03712.67
5.3.160.0060.03612.67
5.3.150.0060.03712.68
5.3.140.0040.03812.66
5.3.130.0070.03612.66
5.3.120.0040.04012.66
5.3.110.0030.04212.66
5.3.100.0050.04412.13
5.3.90.0090.03412.11
5.3.80.0090.03412.11
5.3.70.0040.04612.10
5.3.60.0060.04112.09
5.3.50.0030.03812.03
5.3.40.0060.03512.03
5.3.30.0060.03611.98
5.3.20.0080.03411.77
5.3.10.0060.03411.74
5.3.00.0040.03711.73
5.2.170.0070.0289.22
5.2.160.0030.0309.21
5.2.150.0050.0309.22
5.2.140.0080.0339.21
5.2.130.0070.0309.17
5.2.120.0050.0289.17
5.2.110.0030.0319.18
5.2.100.0040.0299.18
5.2.90.0090.0279.18
5.2.80.0050.0309.17
5.2.70.0060.0319.17
5.2.60.0050.0309.13
5.2.50.0050.0329.10
5.2.40.0030.0329.07
5.2.30.0040.0309.05
5.2.20.0040.0289.04
5.2.10.0040.0308.95
5.2.00.0060.0318.81
5.1.60.0040.0258.09
5.1.50.0040.0268.09
5.1.40.0020.0278.07
5.1.30.0050.0328.43
5.1.20.0030.0288.44
5.1.10.0040.0268.17
5.1.00.0060.0248.17
5.0.50.0030.0216.64
5.0.40.0030.0196.51
5.0.30.0020.0326.31
5.0.20.0050.0176.28
5.0.10.0040.0196.27
5.0.00.0070.0276.25
4.4.90.0030.0164.78
4.4.80.0030.0144.75
4.4.70.0050.0134.76
4.4.60.0010.0174.76
4.4.50.0070.0104.77
4.4.40.0040.0234.71
4.4.30.0040.0134.76
4.4.20.0040.0184.85
4.4.10.0040.0144.84
4.4.00.0030.0254.76
4.3.110.0020.0174.67
4.3.100.0040.0144.66
4.3.90.0040.0144.64
4.3.80.0030.0244.58
4.3.70.0020.0164.63
4.3.60.0040.0144.63
4.3.50.0030.0154.63
4.3.40.0030.0244.54
4.3.30.0040.0143.30
4.3.20.0050.0123.28
4.3.10.0000.0173.24
4.3.00.0030.01716.50

preferences:
44.65 ms | 401 KiB | 5 Q