3v4l.org

run code in 300+ PHP versions simultaneously
<?php # The blueprint for designing creatures for your game interface LivingBeing { public function dealDamage( $idamage); public function takeDamage( $idamage); } class Human implements LivingBeing { private $hp = 150; public function dealDamage( $damage) { } public function takeDamage( $damage) { } } class Elf implements LivingBeing { private $hp = 100; public function dealDamage($damage) { } public function takeDamage($damage) { } } class Dwarf implements LivingBeing { private $hp = 300; public function dealDamage($damage) { } public function takeDamage($damage) { } } # I am a junior dev, I am just going to write this code class Centuar { private $hp = 300; public function dealDamage($opponent) { $opponent->takeDamage(4); } public function takeDamage($damage) { } } class Orc { private $hp = 300; public function dealDamage($damage) { } } $Adam = new Human; $Lucas = new Elf; $Jack = new Dwarf; # Let's fight! $Gabrielle = new Centuar; $Guthakug = new Orc; $Gabrielle->dealDamage($Guthakug);

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.0170.00016.75
8.3.50.0070.01016.13
8.3.40.0150.00618.84
8.3.30.0040.01118.54
8.3.20.0040.00420.73
8.3.10.0040.00421.80
8.3.00.0080.00022.24
8.2.180.0130.00618.54
8.2.170.0120.00622.96
8.2.160.0070.00721.05
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0090.00619.89
8.2.120.0070.00026.35
8.2.110.0030.01420.56
8.2.100.0110.00017.84
8.2.90.0000.00817.75
8.2.80.0090.00018.05
8.2.70.0080.00018.00
8.2.60.0030.00618.09
8.2.50.0000.00918.10
8.2.40.0040.00419.30
8.2.30.0030.00619.17
8.2.20.0040.00417.94
8.2.10.0080.00019.16
8.2.00.0040.00418.31
8.1.280.0040.01125.92
8.1.270.0050.00320.33
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00318.99
8.1.230.0100.00019.10
8.1.220.0060.00317.74
8.1.210.0000.00918.77
8.1.200.0060.00317.36
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0080.00018.64
8.1.160.0040.00418.81
8.1.150.0050.00318.80
8.1.140.0000.00718.98
8.1.130.0050.00217.37
8.1.120.0000.00717.45
8.1.110.0040.00417.50
8.1.100.0000.00917.34
8.1.90.0070.00017.46
8.1.80.0040.00417.48
8.1.70.0030.00317.36
8.1.60.0040.00417.61
8.1.50.0040.00417.41
8.1.40.0040.00417.45
8.1.30.0030.00917.55
8.1.20.0080.00017.69
8.1.10.0040.00417.63
8.1.00.0040.00417.46
8.0.300.0040.00419.83
8.0.290.0040.00416.75
8.0.280.0040.00418.38
8.0.270.0030.00317.26
8.0.260.0030.00316.93
8.0.250.0030.00316.92
8.0.240.0020.00516.91
8.0.230.0070.00016.99
8.0.220.0070.00016.95
8.0.210.0030.00316.85
8.0.200.0070.00017.04
8.0.190.0040.00417.02
8.0.180.0050.00316.99
8.0.170.0030.00617.02
8.0.160.0000.00716.89
8.0.150.0050.00316.88
8.0.140.0090.00016.79
8.0.130.0050.00013.39
8.0.120.0040.00416.89
8.0.110.0040.00416.86
8.0.100.0030.00416.75
8.0.90.0070.00016.93
8.0.80.0070.00717.02
8.0.70.0050.00317.00
8.0.60.0040.00416.95
8.0.50.0040.00416.82
8.0.30.0100.00816.94
8.0.20.0060.01217.13
8.0.10.0000.00716.92
8.0.00.0110.00916.87
7.4.330.0000.00616.84
7.4.320.0000.00616.43
7.4.300.0060.00016.36
7.4.290.0000.00616.61
7.4.280.0000.00716.64
7.4.270.0030.00316.59
7.4.260.0070.00016.48
7.4.250.0030.00316.49
7.4.240.0000.00816.39
7.4.230.0000.00716.61
7.4.220.0030.00416.54
7.4.210.0060.01016.54
7.4.200.0000.00716.53
7.4.160.0070.01216.51
7.4.140.0130.00917.86
7.4.130.0100.01016.34
7.4.120.0070.00916.45
7.4.110.0110.00716.63
7.4.100.0130.00316.57
7.4.90.0090.01516.40
7.4.80.0100.00719.39
7.4.70.0030.01416.53
7.4.60.0060.01016.47
7.4.50.0060.00816.21
7.4.40.0150.00616.51
7.4.00.0060.00914.99
7.3.330.0000.00513.34
7.3.320.0030.00313.24
7.3.310.0070.00016.36
7.3.300.0000.00716.39
7.3.290.0030.00516.38
7.3.280.0150.00616.34
7.3.260.0120.00816.48
7.3.240.0090.01016.41
7.3.230.0080.00816.32
7.3.210.0110.00816.38
7.3.200.0090.00616.59
7.3.190.0070.01016.40
7.3.180.0110.01116.61
7.3.170.0000.02116.35
7.3.160.0090.00616.40
7.3.120.0080.00814.95
7.3.110.0040.01214.76
7.3.100.0070.01014.86
7.3.90.0060.01014.96
7.3.80.0080.00714.77
7.3.70.0060.00614.88
7.3.60.0100.00614.65
7.3.50.0030.01014.61
7.3.40.0080.00614.73
7.3.30.0070.00714.78
7.3.20.0830.00515.78
7.3.10.0730.00915.64
7.3.00.0770.00715.65
7.2.330.0070.01016.39
7.2.320.0130.00716.41
7.2.310.0050.01116.54
7.2.300.0090.00916.77
7.2.290.0120.01216.39
7.2.250.0070.01014.96
7.2.240.0050.01314.76
7.2.230.0070.00914.82
7.2.220.0020.01215.03
7.2.210.0030.00615.05
7.2.200.0070.00614.98
7.2.190.0070.00614.78
7.2.180.0100.00514.93
7.2.170.0030.01014.84
7.2.160.0110.00814.83
7.2.150.1400.00314.96
7.2.140.1470.00515.09
7.2.130.1570.00714.93
7.2.120.1920.01015.03
7.2.110.1570.01215.07
7.2.100.1570.00514.92
7.2.90.2050.01015.04
7.2.80.1530.00715.09
7.2.70.1620.00715.02
7.2.60.1850.00714.96
7.2.50.1760.00315.19
7.2.40.1750.01015.10
7.2.30.1610.00614.97
7.2.20.2110.00815.01
7.2.10.1760.00714.98
7.2.00.1930.01015.01
7.1.330.0050.00915.80
7.1.320.0080.00515.71
7.1.310.0030.00615.62
7.1.300.0070.00815.80
7.1.290.0030.00815.82
7.1.280.0040.01115.73
7.1.270.0840.00814.74
7.1.260.0700.00914.73
7.1.250.1770.00713.89

preferences:
60.69 ms | 400 KiB | 5 Q