3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Fish {} class Mammal {} class Whale extends Mammal {} class Human extends Mammal {} class Shark extends Fish {} // Not very exceptional... class FoundException extends Exception {} function anyFish(array $collection) { $found = false; try { array_walk_recursive($collection, function ($v) { if($v instanceof Fish) throw new FoundException('I found a fish.'); }); } catch (FoundException $e) { $found = true; } return $found; } $seas = [ 'pacific' => [new Whale, new Shark], 'atlantic' => [new Human, new Shark] ]; $pub = [new Human, new Human]; var_dump(anyFish($seas)); var_dump(anyFish($pub));

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.01116.75
8.3.50.0040.01118.20
8.3.40.0100.00718.73
8.3.30.0070.00718.68
8.3.20.0040.00420.90
8.3.10.0030.00621.77
8.3.00.0000.00821.74
8.2.180.0090.00616.75
8.2.170.0090.00619.21
8.2.160.0100.00322.96
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0080.00018.21
8.2.120.0040.00426.35
8.2.110.0070.00319.95
8.2.100.0120.00017.78
8.2.90.0040.00417.63
8.2.80.0000.00818.91
8.2.70.0060.00317.63
8.2.60.0000.00817.63
8.2.50.0030.00517.93
8.2.40.0040.00419.48
8.2.30.0080.00019.37
8.2.20.0000.00918.16
8.2.10.0050.00219.38
8.2.00.0000.00718.03
8.1.280.0140.00725.92
8.1.270.0080.00023.99
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0000.00924.01
8.1.230.0040.00822.81
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00517.35
8.1.190.0040.00817.35
8.1.180.0000.00918.10
8.1.170.0080.00017.62
8.1.160.0000.00718.82
8.1.150.0030.00518.83
8.1.140.0040.00418.91
8.1.130.0080.00020.16
8.1.120.0040.00417.52
8.1.110.0040.00417.46
8.1.100.0050.00317.42
8.1.90.0040.00417.52
8.1.80.0040.00417.54
8.1.70.0030.00317.47
8.1.60.0040.00417.61
8.1.50.0060.00317.43
8.1.40.0040.00417.55
8.1.30.0000.00817.57
8.1.20.0090.00317.72
8.1.10.0040.00417.65
8.1.00.0070.00017.58
8.0.300.0030.00818.77
8.0.290.0000.00716.75
8.0.280.0000.00718.40
8.0.270.0060.00318.55
8.0.260.0000.00618.43
8.0.250.0000.00717.02
8.0.240.0060.00317.05
8.0.230.0000.00717.02
8.0.220.0030.00316.88
8.0.210.0030.00317.01
8.0.200.0040.00417.02
8.0.190.0030.00616.95
8.0.180.0000.00816.93
8.0.170.0030.00616.90
8.0.160.0050.00317.01
8.0.150.0040.00416.82
8.0.140.0000.00716.95
8.0.130.0030.00313.41
8.0.120.0040.00416.94
8.0.110.0050.00316.93
8.0.100.0070.00016.79
8.0.90.0000.00716.90
8.0.80.0080.00717.01
8.0.70.0050.00316.96
8.0.60.0050.00216.87
8.0.50.0040.00416.87
8.0.30.0090.01117.03
8.0.20.0030.01517.40
8.0.10.0000.00717.18
8.0.00.0080.01016.84
7.4.330.0000.00515.55
7.4.320.0040.00416.43
7.4.300.0060.00016.54
7.4.290.0030.00316.47
7.4.280.0030.00516.66
7.4.270.0000.00716.54
7.4.260.0070.00016.61
7.4.250.0000.00716.61
7.4.240.0040.00416.64
7.4.230.0030.00316.75
7.4.220.0050.00316.53
7.4.210.0070.01016.56
7.4.200.0030.00316.66
7.4.160.0100.00516.57
7.4.140.0150.00317.86
7.4.130.0140.00716.48
7.4.120.0150.00816.48
7.4.110.0190.00016.61
7.4.100.0120.00916.68
7.4.90.0070.01016.73
7.4.80.0150.00719.39
7.4.70.0180.01116.49
7.4.60.0120.00616.70
7.4.50.0060.00916.45
7.4.40.0030.01416.30
7.4.00.0050.01115.07
7.3.330.0020.00213.34
7.3.320.0060.00013.41
7.3.310.0000.00716.51
7.3.300.0000.00816.26
7.3.290.0000.00716.36
7.3.280.0190.00516.42
7.3.260.0100.00816.53
7.3.240.0100.00816.49
7.3.230.0100.00716.61
7.3.210.0080.00816.54
7.3.200.0100.00616.74
7.3.190.0030.01416.59
7.3.180.0110.00716.52
7.3.170.0120.00416.53
7.3.160.0060.01116.56
7.3.120.0060.00914.89
7.3.110.0110.00715.02
7.3.100.0120.00414.76
7.3.90.0050.00514.93
7.3.80.0000.01014.73
7.3.70.0030.01214.89
7.3.60.0060.00314.97
7.3.50.0100.00714.92
7.3.40.0040.00414.95
7.3.30.0030.01214.70
7.3.20.0030.01016.66
7.3.10.0450.00615.58
7.3.00.0450.00815.77
7.2.330.0120.00616.72
7.2.320.0110.01116.75
7.2.310.0140.00316.32
7.2.300.0080.00916.68
7.2.290.0060.01616.38
7.2.250.0120.00615.09
7.2.240.0100.01014.97
7.2.230.0100.00715.05
7.2.220.0060.00614.96
7.2.210.0000.01215.05
7.2.200.0110.00415.12
7.2.190.0030.00914.94
7.2.180.0140.00414.70
7.2.170.0070.00314.71
7.2.130.0570.00314.84
7.2.120.0590.01014.79
7.2.110.0830.00014.66
7.2.100.0600.00314.66
7.2.90.0500.00314.94
7.2.80.0540.00714.67
7.2.70.0540.00014.85
7.2.60.0510.00614.86
7.2.50.0510.00014.77
7.2.40.0500.00714.60
7.2.30.0640.00714.84
7.2.20.0550.00314.40
7.2.10.0490.00614.61
7.2.00.0620.00615.03
7.1.330.0080.00815.71
7.1.320.0130.00015.85
7.1.310.0000.01515.65
7.1.300.0060.00615.65
7.1.290.0160.00315.60
7.1.280.0100.00315.79
7.1.270.0060.01015.79
7.1.260.0030.00615.77
7.1.250.0660.00313.80

preferences:
62.81 ms | 401 KiB | 5 Q