3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function() { return true; }); // Insert evil laugh. Please? With a cherry on top? function foo(array $foo) { var_dump('foo'); } foo(1); function bar($bar) { foreach ($bar as $kruk) { echo $kruk; } var_dump('bar'); } bar(1); function meow(Exception $meow) { var_dump('meow', $meow instanceof Exception); } meow(new StdClass()); function baz($baz) { if ( ! is_array($baz)) { throw new InvalidArgumentException('$baz is not an array.'); } var_dump('baz'); } baz(1);

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.40.0040.01119.02
8.3.30.0140.00020.34
8.3.20.0080.00020.38
8.3.10.0040.00421.90
8.3.00.0000.00822.43
8.2.170.0140.00318.91
8.2.160.0060.00822.96
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00521.09
8.2.110.0060.00322.25
8.2.100.0060.00717.66
8.2.90.0070.00417.91
8.2.80.0040.00418.86
8.2.70.0030.00618.04
8.2.60.0000.00818.03
8.2.50.0030.00619.34
8.2.40.0030.00719.47
8.2.30.0090.00019.25
8.2.20.0060.00317.79
8.2.10.0030.00617.61
8.2.00.0000.00817.82
8.1.270.0040.00424.00
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00619.17
8.1.230.0110.00020.90
8.1.220.0080.00017.74
8.1.210.0000.00918.98
8.1.200.0070.00317.11
8.1.190.0000.00817.23
8.1.180.0040.00418.76
8.1.170.0040.00418.58
8.1.160.0000.00719.03
8.1.150.0030.00618.52
8.1.140.0060.00317.35
8.1.130.0070.00017.73
8.1.120.0000.00717.27
8.1.110.0000.00817.42
8.1.100.0030.00617.29
8.1.90.0040.00417.46
8.1.80.0070.00017.29
8.1.70.0030.00317.42
8.1.60.0050.00317.55
8.1.50.0070.00017.35
8.1.40.0030.00617.45
8.1.30.0050.00217.59
8.1.20.0060.00317.61
8.1.10.0030.00617.53
8.1.00.0040.00417.44
8.0.300.0050.00220.04
8.0.290.0000.00816.63
8.0.280.0040.00418.39
8.0.270.0070.00017.22
8.0.260.0000.00716.88
8.0.250.0000.00716.98
8.0.240.0050.00516.98
8.0.230.0030.00316.84
8.0.220.0030.00316.82
8.0.210.0000.00716.81
8.0.200.0000.00617.09
8.0.190.0040.00417.04
8.0.180.0000.00816.89
8.0.170.0060.00317.00
8.0.160.0000.00817.03
8.0.150.0050.00216.80
8.0.140.0000.00816.85
8.0.130.0040.00413.44
8.0.120.0000.00816.99
8.0.110.0000.00816.88
8.0.100.0080.00016.91
8.0.90.0020.00517.03
8.0.80.0030.01216.94
8.0.70.0000.00716.86
8.0.60.0070.00016.87
8.0.50.0030.00516.80
8.0.30.0120.00816.93
8.0.20.0150.00417.40
8.0.10.0040.00416.91
8.0.00.0100.00916.69
7.4.330.0000.00515.00
7.4.320.0040.00416.55
7.4.300.0000.00616.53
7.4.290.0040.00416.42
7.4.280.0070.00016.46
7.4.270.0070.00016.58
7.4.260.0050.00313.34
7.4.250.0030.00516.43
7.4.240.0040.00416.41
7.4.230.0070.00016.50
7.4.220.0140.00716.58
7.4.210.0090.00616.53
7.4.200.0000.00816.29
7.4.190.0070.00016.51
7.4.160.0070.01116.67
7.4.150.0090.00917.40
7.4.140.0070.01017.86
7.4.130.0070.01116.62
7.4.120.0110.00916.50
7.4.110.0100.00616.50
7.4.100.0120.00616.42
7.4.90.0070.01116.39
7.4.80.0060.01219.39
7.4.70.0090.00916.48
7.4.60.0100.00616.39
7.4.50.0080.00016.23
7.4.40.0090.00622.77
7.4.30.0110.00616.40
7.4.10.0070.01014.70
7.4.00.0070.00914.73
7.3.330.0060.00013.14
7.3.320.0000.00513.43
7.3.310.0030.00316.21
7.3.300.0030.00316.32
7.3.290.0100.00316.31
7.3.280.0070.01216.32
7.3.270.0060.00917.40
7.3.260.0040.01316.53
7.3.250.0070.01016.36
7.3.240.0060.01016.38
7.3.230.0100.00716.56
7.3.210.0100.00716.46
7.3.200.0140.00319.39
7.3.190.0100.00716.67
7.3.180.0060.00916.44
7.3.170.0030.01316.37
7.3.160.0120.00416.39
7.3.130.0060.01214.62
7.3.120.0060.01114.78
7.3.110.0090.00614.70
7.3.100.0000.01214.69
7.3.90.0030.01014.77
7.3.80.0100.00314.80
7.3.70.0040.00414.46
7.3.60.0040.01214.87
7.3.50.0000.01714.95
7.3.40.0060.00914.78
7.3.30.0060.00614.84
7.3.20.0130.00016.54
7.3.10.0040.01216.48
7.3.00.0040.00816.77
7.2.330.0090.00916.64
7.2.320.0120.01016.51
7.2.310.0140.00416.48
7.2.300.0090.00616.23
7.2.290.0130.00316.65
7.2.260.0070.01314.86
7.2.250.0040.01515.19
7.2.240.0070.00714.90
7.2.230.0040.00814.80
7.2.220.0060.00914.63
7.2.210.0100.00314.64
7.2.200.0060.00914.96
7.2.190.0000.01715.13
7.2.180.0090.00615.01
7.2.170.0060.01015.03
7.2.160.0000.01215.04
7.2.150.0000.01516.69
7.2.140.0070.01016.59
7.2.130.0080.00416.70
7.2.120.0030.01316.92
7.2.110.0060.00916.86
7.2.100.0000.01116.84
7.2.90.0030.01616.81
7.2.80.0060.00316.71
7.2.70.0060.00617.00
7.2.60.0060.00916.73
7.2.50.0070.01116.78
7.2.40.0000.01416.80
7.2.30.0070.00716.96
7.2.20.0060.00816.71
7.2.10.0060.00916.80
7.2.00.0050.01118.11
7.1.330.0080.00415.89
7.1.320.0090.00615.73
7.1.310.0080.00415.61
7.1.300.0070.01015.54
7.1.290.0040.01415.76
7.1.280.0090.00615.91
7.1.270.0030.00915.73
7.1.260.0080.00815.74
7.1.250.0000.01615.45
7.1.240.0000.01315.72
7.1.230.0080.00015.58
7.1.220.0030.00915.34
7.1.210.0060.00915.52
7.1.200.0160.00315.52
7.1.190.0060.00915.66
7.1.180.0090.00015.66
7.1.170.0040.01115.50
7.1.160.0030.01015.69
7.1.150.0060.00315.70
7.1.140.0100.00315.70
7.1.130.0030.00615.78
7.1.120.0030.01015.64
7.1.110.0030.00615.71
7.1.100.0080.01016.92
7.1.90.0060.00615.52
7.1.80.0040.01115.41
7.1.70.0050.00416.39
7.1.60.0100.00817.56
7.1.50.0020.01116.27
7.1.40.0000.01215.71
7.1.30.0030.00615.63
7.1.20.0030.00615.75
7.1.10.0030.00715.71
7.1.00.0050.02018.98
7.0.330.0080.00815.27
7.0.320.0000.01415.40
7.0.310.0100.00315.06
7.0.300.0080.00315.15
7.0.290.0130.00015.52
7.0.280.0000.00915.08
7.0.270.0060.00315.34
7.0.260.0080.00415.32
7.0.250.0040.00415.28
7.0.240.0000.01115.45
7.0.230.0080.00515.50
7.0.220.0030.01115.29
7.0.210.0040.00715.28
7.0.200.0020.00815.97
7.0.190.0100.00315.29
7.0.180.0070.00315.37
7.0.170.0000.01415.37
7.0.160.0040.00914.99
7.0.150.0060.00615.22
7.0.140.0060.03718.56
7.0.130.0000.00915.31
7.0.120.0030.01015.35
7.0.110.0070.00715.20
7.0.100.0050.00515.39
7.0.90.0120.00015.23
7.0.80.0040.01115.11
7.0.70.0030.00915.40
7.0.60.0100.03717.59
7.0.50.0030.02516.70
7.0.40.0050.03516.91
7.0.30.0170.04216.77
7.0.20.0190.02716.71
7.0.10.0100.03016.79
7.0.00.0050.03516.76
5.6.400.0030.01214.36
5.6.390.0030.00814.28
5.6.380.0060.00614.13
5.6.370.0030.00914.39
5.6.360.0030.01414.06
5.6.350.0000.01414.32
5.6.340.0030.00614.73
5.6.330.0080.00313.98
5.6.320.0030.01014.35
5.6.310.0000.01014.13
5.6.300.0060.00914.51
5.6.290.0030.00614.45
5.6.280.0070.04017.57
5.6.270.0030.01014.61
5.6.260.0120.00314.38
5.6.250.0000.01214.27
5.6.240.0040.01114.14
5.6.230.0070.00714.56
5.6.220.0040.00714.25
5.6.210.0100.04017.51
5.6.200.0050.03316.36
5.6.190.0090.03017.39
5.6.180.0080.03317.36
5.6.170.0130.03317.51
5.6.160.0090.04517.47
5.6.150.0070.03216.39
5.6.140.0080.04016.15
5.6.130.0090.02216.20
5.6.120.0060.03717.60
5.6.110.0050.04017.68
5.6.100.0110.04217.67
5.6.90.0050.03317.71
5.6.80.0100.04017.21
5.6.70.0140.02417.32
5.6.60.0000.01413.98
5.6.50.0000.01513.86
5.6.40.0040.00814.26
5.6.30.0040.00714.31
5.6.20.0040.01214.24
5.6.10.0040.00814.30
5.6.00.0120.00314.16
5.5.380.0060.00914.52
5.5.370.0030.00614.23
5.5.360.0100.00314.09
5.5.350.0050.02617.20
5.5.340.0080.02316.15
5.5.330.0030.03217.24
5.5.320.0180.03617.17
5.5.310.0130.03717.40
5.5.300.0030.04616.11
5.5.290.0050.03916.01
5.5.280.0030.04017.46
5.5.270.0070.03317.60
5.5.260.0100.04117.44
5.5.250.0080.04117.49
5.5.240.0050.03217.05
5.5.230.0060.00614.38
5.5.220.0070.00713.93
5.5.210.0030.00714.15
5.5.200.0000.01714.05
5.5.190.0030.01014.03
5.5.180.0030.01014.34
5.5.170.0090.00314.07
5.5.160.0030.01013.99
5.5.150.0060.00614.30
5.5.140.0040.00413.67
5.5.130.0000.00914.46
5.5.120.0000.00913.77
5.5.110.0070.00414.29
5.5.100.0060.01013.98
5.5.90.0110.00014.05
5.5.80.0060.00914.43
5.5.70.0090.00313.73
5.5.60.0060.00613.99
5.5.50.0090.00614.08
5.5.40.0040.00814.13
5.5.30.0060.00613.99
5.5.20.0090.00014.31
5.5.10.0030.01014.25
5.5.00.0060.00614.14
5.4.450.0960.03316.12
5.4.440.0800.02416.32
5.4.430.0840.01916.24
5.4.420.0850.02016.17
5.4.410.0950.02716.12
5.4.400.0950.02716.11
5.4.390.0930.02816.14
5.4.380.0770.02815.90
5.4.370.0850.01816.03
5.4.360.0500.03916.05
5.4.350.0050.04216.05
5.4.340.0050.02015.92
5.4.330.0080.00412.96
5.4.320.0850.01816.02
5.4.310.0920.02315.92
5.4.300.0930.01816.05
5.4.290.0950.02416.03
5.4.280.0170.03615.96
5.4.270.0040.03116.01
5.4.260.0030.03215.93
5.4.250.0270.03616.09
5.4.240.0970.02216.09
5.4.230.0950.02316.02
5.4.220.0750.02516.03
5.4.210.0990.01715.90
5.4.200.0870.02316.02
5.4.190.0080.02215.91
5.4.180.0060.02116.02
5.4.170.0250.04116.07
5.4.160.0820.01816.10
5.4.150.0880.01916.01
5.4.140.0820.02214.68
5.4.130.0930.02614.70
5.4.120.0900.02614.69
5.4.110.0890.01814.70
5.4.100.0940.02414.79
5.4.90.0940.01814.79
5.4.80.0970.02214.78
5.4.70.0970.02614.79
5.4.60.0680.02514.75
5.4.50.0030.02514.74
5.4.40.0050.02314.75
5.4.30.0760.02514.67
5.4.20.0830.02214.72
5.4.10.1010.02114.69
5.4.00.0960.02414.38
5.3.290.0800.02513.89
5.3.280.0970.02713.75
5.3.270.1040.02213.83
5.3.260.0830.02313.78
5.3.250.0900.02013.78
5.3.240.0880.02013.80
5.3.230.0870.02013.78
5.3.220.0370.02213.77
5.3.210.0020.02613.77
5.3.200.0120.03013.78
5.3.190.0810.01813.78
5.3.180.0890.01813.72
5.3.170.0870.01913.81
5.3.160.0870.02113.76
5.3.150.0860.01813.81
5.3.140.0860.01913.84
5.3.130.0820.02813.76
5.3.120.0780.02613.72
5.3.110.0820.02513.75
5.3.100.0050.03213.52
5.3.90.0050.02113.50
5.3.80.0060.01913.45
5.3.70.0590.02413.53
5.3.60.0860.02613.51
5.3.50.0050.02213.42
5.3.40.0070.01913.50
5.3.30.0420.02413.50
5.3.20.0900.02513.40
5.3.10.0860.02613.32
5.3.00.0860.02113.34
5.2.170.1330.03311.19
5.2.160.1670.03011.18
5.2.150.1570.03311.22
5.2.140.1330.03311.00
5.2.130.1430.03011.26
5.2.120.1530.02711.15
5.2.110.1430.02711.04
5.2.100.1500.03011.04
5.2.90.1470.03011.04
5.2.80.0270.04711.14
5.2.70.0130.05010.95
5.2.60.0100.02310.90
5.2.50.0930.04710.85
5.2.40.1130.03011.00
5.2.30.1300.03311.02
5.2.20.1130.02710.82
5.2.10.1270.04010.75
5.2.00.1200.03310.82
5.1.60.1370.02310.15
5.1.50.1270.0339.93
5.1.40.1270.0279.86
5.1.30.1430.03010.49
5.1.20.1270.02710.36
5.1.10.1200.0209.94
5.1.00.1200.0279.93
5.0.50.0500.0238.52
5.0.40.0670.0208.49
5.0.30.0400.0578.19
5.0.20.0030.0238.27
5.0.10.0030.0338.31
5.0.00.0000.0378.28
4.4.90.0000.0377.89
4.4.80.0000.0207.89
4.4.70.0030.0207.89
4.4.60.0070.0237.89
4.4.50.0170.0207.89
4.4.40.0770.0177.89
4.4.30.0670.0107.89
4.4.20.0870.0277.89
4.4.10.0730.0207.89
4.4.00.0800.0277.89
4.3.110.0670.0177.89
4.3.100.0770.0207.89
4.3.90.0770.0177.89
4.3.80.0530.0277.89
4.3.70.0600.0177.89
4.3.60.0600.0137.89
4.3.50.0530.0177.89
4.3.40.0630.0277.89
4.3.30.0300.0207.89
4.3.20.0270.0177.89
4.3.10.0230.0177.89
4.3.00.0270.0177.89

preferences:
53.44 ms | 400 KiB | 5 Q