3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function() { return false; }); // 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.60.0120.00316.88
8.3.50.0160.01522.04
8.3.40.0110.00418.79
8.3.30.0100.01019.04
8.3.20.0040.00420.33
8.3.10.0040.00423.68
8.3.00.0040.00420.94
8.2.180.0070.01118.29
8.2.170.0180.00422.96
8.2.160.0160.00322.08
8.2.150.0000.00824.18
8.2.140.0040.00724.66
8.2.130.0070.00026.16
8.2.120.0000.00819.36
8.2.110.0060.00320.52
8.2.100.0110.00018.18
8.2.90.0060.00617.91
8.2.80.0040.00418.73
8.2.70.0000.00817.75
8.2.60.0000.00917.63
8.2.50.0030.00517.93
8.2.40.0040.00419.35
8.2.30.0050.00218.27
8.2.20.0060.00317.77
8.2.10.0080.00018.03
8.2.00.0040.00419.43
8.1.280.0100.01025.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0070.00322.13
8.1.230.0040.00820.84
8.1.220.0030.00517.76
8.1.210.0060.00318.77
8.1.200.0000.00817.23
8.1.190.0000.00817.35
8.1.180.0060.00318.10
8.1.170.0000.00717.62
8.1.160.0050.00322.02
8.1.150.0040.00418.59
8.1.140.0070.00017.38
8.1.130.0040.00417.62
8.1.120.0000.00717.40
8.1.110.0040.00417.39
8.1.100.0040.00417.41
8.1.90.0000.00717.43
8.1.80.0040.00417.31
8.1.70.0030.00317.41
8.1.60.0060.00317.48
8.1.50.0030.00617.42
8.1.40.0040.00417.37
8.1.30.0040.00417.63
8.1.20.0050.00317.59
8.1.10.0040.00417.59
8.1.00.0000.00817.31
8.0.300.0030.01019.71
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0000.00717.27
8.0.260.0080.00017.26
8.0.250.0030.00317.04
8.0.240.0100.00017.01
8.0.230.0070.00016.89
8.0.220.0040.00416.85
8.0.210.0030.00516.82
8.0.200.0050.00217.00
8.0.190.0000.00717.01
8.0.180.0040.00416.91
8.0.170.0000.00916.98
8.0.160.0030.00316.98
8.0.150.0040.00416.92
8.0.140.0050.00216.93
8.0.130.0000.00513.38
8.0.120.0000.00816.82
8.0.110.0040.00416.86
8.0.100.0040.00417.03
8.0.90.0050.00317.01
8.0.80.0030.01916.96
8.0.70.0070.00016.86
8.0.60.0030.00616.84
8.0.50.0000.00716.87
8.0.30.0110.00716.94
8.0.20.0090.00917.40
8.0.10.0030.00517.13
8.0.00.0050.01216.75
7.4.330.0000.00515.00
7.4.320.0000.00616.60
7.4.300.0040.00416.37
7.4.290.0070.00016.60
7.4.280.0060.00316.54
7.4.270.0070.00016.36
7.4.260.0070.00016.58
7.4.250.0050.00316.52
7.4.240.0020.00616.54
7.4.230.0000.00716.44
7.4.220.0070.01016.45
7.4.210.0070.01116.48
7.4.200.0020.00516.30
7.4.160.0060.00916.57
7.4.150.0130.00717.40
7.4.140.0100.00717.86
7.4.130.0080.00816.64
7.4.120.0110.00916.64
7.4.110.0040.01416.54
7.4.100.0070.01116.55
7.4.90.0100.00716.43
7.4.80.0030.01419.39
7.4.70.0070.01016.63
7.4.60.0070.01016.36
7.4.50.0040.00416.34
7.4.40.0060.01716.43
7.4.30.0070.01016.55
7.4.00.0070.01115.03
7.3.330.0000.00713.14
7.3.320.0030.00313.17
7.3.310.0030.00316.27
7.3.300.0070.00016.28
7.3.290.0030.01016.26
7.3.280.0090.00916.27
7.3.270.0100.00717.40
7.3.260.0110.01216.29
7.3.250.0170.00216.55
7.3.240.0100.00916.39
7.3.230.0120.00616.39
7.3.210.0120.00616.32
7.3.200.0030.01319.39
7.3.190.0110.01116.29
7.3.180.0090.00616.46
7.3.170.0100.00716.50
7.3.160.0070.00916.25
7.3.120.0030.01314.95
7.2.330.0100.00716.77
7.2.320.0100.01316.53
7.2.310.0130.00616.55
7.2.300.0120.00616.58
7.2.290.0090.01316.55
7.2.60.0040.01116.68
7.2.00.0030.00919.45
7.1.200.0060.00915.55
7.1.100.0030.00518.32
7.1.70.0090.00316.96
7.1.60.0170.00719.70
7.1.50.0100.01016.73
7.1.00.0030.07722.31
7.0.200.0030.00616.68
7.0.140.0070.06722.10
7.0.100.0270.08320.19
7.0.90.0100.07719.95
7.0.80.0170.08019.88
7.0.70.0230.05019.95
7.0.60.0130.03719.95
7.0.50.0200.06720.41
7.0.40.0000.06720.17
7.0.30.0000.04320.14
7.0.20.0070.07320.14
7.0.10.0070.07720.00
7.0.00.0030.04719.98
5.6.280.0100.06721.10
5.6.250.0000.04720.64
5.6.240.0030.09020.73
5.6.230.0070.07020.63
5.6.220.0130.07320.62
5.6.210.0000.07020.56
5.6.200.0100.07721.07
5.6.190.0100.08021.05
5.6.180.0030.05721.18
5.6.170.0030.08721.17
5.6.160.0070.06021.09
5.6.150.0030.05021.11
5.6.140.0030.08021.04
5.6.130.0070.04721.06
5.6.120.0070.06021.04
5.6.110.0100.07021.11
5.6.100.0000.05721.03
5.6.90.0030.06021.07
5.6.80.0100.08020.48
5.6.70.0000.08720.34
5.6.60.0030.08320.42
5.6.50.0100.07720.42
5.6.40.0100.03720.33
5.6.30.0070.07020.30
5.6.20.0070.03320.47
5.6.10.0130.07020.43
5.6.00.0070.08020.30
5.5.380.0000.07720.36
5.5.370.0130.07720.36
5.5.360.0100.03320.43
5.5.350.0070.08320.38
5.5.340.0100.06320.85
5.5.330.0070.07320.82
5.5.320.0030.04020.65
5.5.310.0070.04020.88
5.5.300.0130.04020.90
5.5.290.0030.08320.77
5.5.280.0130.07020.80
5.5.270.0070.06320.80
5.5.260.0100.07720.64
5.5.250.0030.04320.73
5.5.240.0000.06320.15
5.5.230.0070.05020.31
5.5.220.0070.09320.02
5.5.210.0070.07020.16
5.5.200.0170.05320.13
5.5.190.0200.06720.21
5.5.180.0030.06020.28
5.5.160.0100.06720.13
5.5.150.0030.03720.21
5.5.140.0070.08020.23
5.5.130.0030.07720.18
5.5.120.0030.06720.18
5.5.110.0030.03719.97
5.5.100.0070.08020.18
5.5.90.0070.04720.16
5.5.80.0200.06320.07
5.5.70.0130.06320.05
5.5.60.0130.06720.12
5.5.50.0070.07320.06
5.5.40.0070.07720.12
5.5.30.0070.03720.14
5.5.20.0000.04320.05
5.5.10.0100.07319.96
5.5.00.0070.03720.07
5.4.450.0070.05719.38
5.4.440.0130.07319.38
5.4.430.0030.07719.20
5.4.420.0070.07019.54
5.4.410.0130.06719.32
5.4.400.0070.04019.05
5.4.390.0030.07319.23
5.4.380.0070.06019.05
5.4.370.0130.06019.03
5.4.360.0030.04319.04
5.4.350.0000.08319.03
5.4.340.0030.07719.05
5.4.320.0000.06319.21
5.4.310.0000.05718.90
5.4.300.0030.06319.13
5.4.290.0070.06019.02
5.4.280.0030.03718.85
5.4.270.0030.06718.92
5.4.260.0100.03319.18
5.4.250.0070.03319.16
5.4.240.0100.04319.04
5.4.230.0070.07718.87
5.4.220.0030.04319.13
5.4.210.0070.06319.14
5.4.200.0100.07319.16
5.4.190.0070.06319.11
5.4.180.0100.07719.15
5.4.170.0130.07019.15
5.4.160.0070.05319.21
5.4.150.0100.05318.89
5.4.140.0030.03016.36
5.4.130.0070.03316.54
5.4.120.0070.06716.39
5.4.110.0000.05316.48
5.4.100.0000.05016.52
5.4.90.0100.06316.39
5.4.80.0030.03716.43
5.4.70.0000.07716.38
5.4.60.0100.04316.46
5.4.50.0100.05716.41
5.4.40.0100.07716.36
5.4.30.0030.04016.53
5.4.20.0070.06316.36
5.4.10.0100.04016.32
5.4.00.0030.07015.70
5.3.290.0030.05014.66
5.3.280.0070.07314.57
5.3.270.0000.05314.72
5.3.260.0070.07314.59
5.3.250.0030.04014.72
5.3.240.0030.08014.59
5.3.230.0070.07014.53
5.3.220.0100.05014.63
5.3.210.0030.04314.54
5.3.200.0100.06714.70
5.3.190.0030.06014.64
5.3.180.0070.06014.55
5.3.170.0000.04714.67
5.3.160.0070.04014.64
5.3.150.0030.03714.60
5.3.140.0030.05014.48
5.3.130.0030.06314.56
5.3.120.0000.07014.61
5.3.110.0030.08014.61
5.3.100.0030.03714.03
5.3.90.0030.03714.15
5.3.80.0070.03014.04
5.3.70.0130.07714.00
5.3.60.0030.06013.94
5.3.50.0030.05013.86
5.3.40.0130.07013.88
5.3.30.0070.05014.05
5.3.20.0000.07313.69
5.3.10.0100.06713.73
5.3.00.0100.06313.71
5.2.170.0030.06312.01
5.2.160.0030.04712.01
5.2.150.0000.05312.01
5.2.140.0070.03012.01
5.2.130.0070.05312.01
5.2.120.0000.03012.01
5.2.110.0030.03712.01
5.2.100.0030.02712.01
5.2.90.0000.06312.01
5.2.80.0030.04312.01
5.2.70.0130.03312.01
5.2.60.0130.04712.01
5.2.50.0030.02712.01
5.2.40.0030.06712.01
5.2.30.0070.05012.01
5.2.20.0000.03712.01
5.2.10.0000.05312.01
5.2.00.0000.05712.01
5.1.60.0000.05012.01
5.1.50.0030.05312.01
5.1.40.0030.02712.01
5.1.30.0000.05712.01
5.1.20.0030.02712.01
5.1.10.0070.02712.01
5.1.00.0070.04712.01
5.0.50.0000.02012.01
5.0.40.0030.04012.01
5.0.30.0030.06312.01
5.0.20.0030.03312.01
5.0.10.0030.04312.01
5.0.00.0030.04712.01
4.4.90.0000.03312.01
4.4.80.0000.02712.01
4.4.70.0000.03012.01
4.4.60.0000.03012.01
4.4.50.0070.02712.01
4.4.40.0030.03012.01
4.4.30.0030.03312.01
4.4.20.0030.02712.01
4.4.10.0030.03312.01
4.4.00.0000.02712.01
4.3.110.0000.02312.01
4.3.100.0000.01712.01
4.3.90.0030.02012.01
4.3.80.0030.02712.01
4.3.70.0000.03312.01
4.3.60.0030.01312.01
4.3.50.0030.03312.01
4.3.40.0030.03712.01
4.3.30.0000.01312.01
4.3.20.0000.02712.01
4.3.10.0030.02012.01
4.3.00.0000.03712.01

preferences:
51.71 ms | 401 KiB | 5 Q