3v4l.org

run code in 300+ PHP versions simultaneously
<?php define("CLI", !isset($_SERVER['HTTP_USER_AGENT'])); $lt = (CLI) ? "\r\n" : "<br />"; /** * Abstract Surfer Class * * @package hangten */ abstract class Surfer { abstract public function rideWave($amplitude); public function applyWax($waxType){ echo("Ahh, all waxed up with '".$waxType."', ready to go!" . $lt); } public function paddleOut(){ echo("Paddling...." . $lt); } public function screamShark(){ echo("SHARK!!" . $lt); } } /** * RookieSurfer Class * * This surfer is green and can barely surf =) * @package hangten */ class RookieSurfer extends Surfer { public function rideWave($amplitude = 1){ echo("Trying.. Trying.. to ride a ".$amplitude."ft. wave, whew!" . $lt); } } /** * ProSurfer Class * * This surfer is crazy skilled!! * @package hangten */ class ProSurfer extends Surfer { public function rideWave($amplitude = 8){ echo("Riding a ".$amplitude."ft. wave backwards doing a backflip!" . $lt); } public function killSharkWithBoard(){ echo("totally just sliced that shark in two, he's over it!! booya!" . $lt); } } // Rookie Instantiation $rookie = new RookieSurfer; $rookie->applyWax("Candle Wax"); $rookie->paddleOut(); $rookie->rideWave(2); $rookie->screamShark(); // Pro Instantiation $pro = new ProSurfer; $pro->applyWax("Sex Wax"); $pro->paddleOut(); $pro->rideWave(50); $pro->killSharkWithBoard();

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.00918.43
8.3.50.0120.01021.15
8.3.40.0060.00918.98
8.3.30.0030.01020.43
8.3.20.0050.00220.04
8.3.10.0060.00321.18
8.3.00.0090.00022.42
8.2.180.0120.00616.88
8.2.170.0000.01522.96
8.2.160.0070.00722.07
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0030.00526.16
8.2.120.0140.00020.74
8.2.110.0090.00019.33
8.2.100.0080.00417.91
8.2.90.0050.00321.11
8.2.80.0080.00018.04
8.2.70.0000.00818.03
8.2.60.0030.00618.34
8.2.50.0040.00418.10
8.2.40.0030.00518.14
8.2.30.0040.00419.36
8.2.20.0080.00017.92
8.2.10.0030.00517.90
8.2.00.0080.00017.68
8.1.280.0080.00825.92
8.1.270.0030.00623.99
8.1.260.0070.00726.35
8.1.250.0050.00228.09
8.1.240.0070.00322.18
8.1.230.0090.00320.87
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00717.23
8.1.190.0040.00417.25
8.1.180.0060.00318.10
8.1.170.0000.00818.50
8.1.160.0070.00018.76
8.1.150.0040.00418.64
8.1.140.0000.00717.34
8.1.130.0040.00417.91
8.1.120.0030.00317.51
8.1.110.0000.00717.44
8.1.100.0070.00017.37
8.1.90.0070.00017.46
8.1.80.0040.00417.44
8.1.70.0030.00317.44
8.1.60.0000.00817.61
8.1.50.0000.00717.43
8.1.40.0070.00017.43
8.1.30.0030.00617.50
8.1.20.0060.00317.63
8.1.10.0000.00817.67
8.1.00.0000.00717.54
8.0.300.0070.00020.02
8.0.290.0050.00216.75
8.0.280.0000.00818.43
8.0.270.0030.00517.28
8.0.260.0000.00616.86
8.0.250.0000.00717.11
8.0.240.0060.00317.05
8.0.230.0000.00717.01
8.0.220.0000.00716.98
8.0.210.0000.00716.94
8.0.200.0040.00417.08
8.0.190.0000.00716.94
8.0.180.0070.00016.89
8.0.170.0050.00317.02
8.0.160.0050.00216.85
8.0.150.0000.00716.82
8.0.140.0040.00416.92
8.0.130.0060.00013.40
8.0.120.0000.00816.81
8.0.110.0040.00417.02
8.0.100.0040.00416.94
8.0.90.0040.00417.04
8.0.80.0120.00316.95
8.0.70.0000.00817.02
8.0.60.0040.00416.78
8.0.50.0000.00716.89
8.0.30.0100.01017.24
8.0.20.0110.00817.40
8.0.10.0000.00716.98
8.0.00.0080.01316.78
7.4.330.0050.00016.71
7.4.320.0030.00316.63
7.4.300.0000.00716.62
7.4.290.0030.00316.66
7.4.280.0000.00716.52
7.4.270.0030.00316.62
7.4.260.0000.00513.32
7.4.250.0040.00416.51
7.4.240.0070.00016.55
7.4.230.0030.00316.70
7.4.220.0070.01016.72
7.4.210.0090.00816.62
7.4.200.0070.00016.62
7.4.190.0000.00716.66
7.4.160.0050.01016.40
7.4.150.0200.00317.40
7.4.140.0090.00917.86
7.4.130.0130.00616.50
7.4.120.0080.00816.63
7.4.110.0110.00716.58
7.4.100.0070.01416.53
7.4.90.0120.00616.49
7.4.80.0090.01419.39
7.4.70.0070.01016.56
7.4.60.0030.01316.55
7.4.50.0050.00316.33
7.4.40.0080.00422.77
7.4.30.0120.01116.46
7.4.00.0030.01215.04
7.3.330.0030.00313.46
7.3.320.0000.00513.41
7.3.310.0050.00316.47
7.3.300.0000.00716.27
7.3.290.0030.01216.43
7.3.280.0080.01116.39
7.3.270.0030.01717.40
7.3.260.0100.01118.24
7.3.250.0070.01116.42
7.3.240.0140.00716.59
7.3.230.0070.01116.39
7.3.210.0030.01416.43
7.3.200.0030.01619.39
7.3.190.0110.00816.56
7.3.180.0040.01116.25
7.3.170.0100.00716.51
7.3.160.0080.00816.34
7.3.120.0090.00914.96
7.3.110.0060.00614.82
7.3.100.0040.01414.94
7.3.90.0100.00714.93
7.3.80.0070.00414.82
7.3.70.0060.01014.72
7.3.60.0140.00014.86
7.3.50.0090.00614.73
7.3.40.0070.00314.67
7.3.30.0040.00714.86
7.3.20.0100.00316.75
7.3.10.0030.00916.75
7.3.00.0070.00416.57
7.2.330.0160.00016.55
7.2.320.0070.01116.56
7.2.310.0040.01916.66
7.2.300.0030.01316.67
7.2.290.0140.00716.71
7.2.250.0070.01115.26
7.2.240.0150.00615.03
7.2.230.0100.00715.37
7.2.220.0080.00415.03
7.2.210.0070.00714.82
7.2.200.0070.00415.29
7.2.190.0030.01315.14
7.2.180.0090.00014.90
7.2.170.0040.00815.27
7.2.60.0090.00617.01
7.2.50.0110.00417.19
7.1.330.0030.01015.68
7.1.320.0040.00815.77
7.1.310.0110.00315.86
7.1.300.0030.01015.86
7.1.290.0060.00615.81
7.1.280.0000.01415.58
7.1.270.0000.00915.64
7.1.260.0000.00815.70
7.1.200.0090.00015.87
7.1.70.0140.00416.95
7.1.60.0120.00619.17
7.1.50.0060.00616.94
7.1.00.0030.03322.30
7.0.200.0000.00716.83
7.0.140.0070.07322.16
7.0.80.0130.07719.91
7.0.70.0170.07719.86
7.0.60.0130.03720.04
7.0.50.0100.04320.43
7.0.40.0030.04320.05
7.0.30.0030.05320.00
7.0.20.0100.03720.10
7.0.10.0100.04019.95
7.0.00.0030.07020.10
5.6.280.0030.07320.92
5.6.230.0200.06720.59
5.6.220.0070.08020.69
5.6.210.0170.03320.77
5.6.200.0000.04721.13
5.6.190.0000.04720.98
5.6.180.0070.03720.95
5.6.170.0130.03321.03
5.6.160.0130.07320.98
5.6.150.0030.08021.05
5.6.140.0030.03721.01
5.6.130.0000.07321.07
5.6.120.0030.04321.12
5.6.110.0030.04321.01
5.6.100.0030.04721.14
5.6.90.0070.04321.02
5.6.80.0000.05320.50
5.6.70.0070.03720.43
5.6.60.0100.05020.39
5.6.50.0000.04320.39
5.6.40.0000.04720.46
5.6.30.0070.03720.54
5.6.20.0070.03320.40
5.6.10.0000.04320.39
5.6.00.0030.04020.38
5.5.370.0070.07020.47
5.5.360.0070.08020.46
5.5.350.0030.06320.44
5.5.340.0070.04020.88
5.5.330.0030.04720.81
5.5.320.0170.03020.66
5.5.310.0030.05320.66
5.5.300.0070.04020.81
5.5.290.0130.03720.94
5.5.280.0030.04020.77
5.5.270.0100.03720.87
5.5.260.0000.04320.91
5.5.250.0030.04320.55
5.5.240.0030.04020.29
5.5.230.0030.04020.18
5.5.220.0000.04320.16
5.5.210.0070.06320.21
5.5.200.0030.04020.19
5.5.190.0070.03720.14
5.5.180.0070.04720.24
5.5.160.0030.05720.10
5.5.150.0070.03720.00
5.5.140.0070.03020.26
5.5.130.0070.04020.26
5.5.120.0030.03320.26
5.5.110.0130.06020.19
5.5.100.0130.06320.09
5.5.90.0170.06719.96
5.5.80.0170.06720.07
5.5.70.0070.04320.13
5.5.60.0070.06319.98
5.5.50.0130.07720.07
5.5.40.0030.06320.13
5.5.30.0130.06320.01
5.5.20.0170.06320.16
5.5.10.0130.07320.11
5.5.00.0200.03320.08
5.4.450.0000.04319.49
5.4.440.0030.04019.45
5.4.430.0130.05319.36
5.4.420.0130.03319.17
5.4.410.0030.03719.05
5.4.400.0070.03319.09
5.4.390.0070.04019.03
5.4.380.0000.04719.03
5.4.370.0030.03318.88
5.4.360.0030.05019.14
5.4.350.0030.04018.88
5.4.340.0030.04319.05
5.4.320.0030.06318.95
5.4.310.0030.04718.87
5.4.300.0070.03019.18
5.4.290.0100.03318.87
5.4.280.0130.02719.04
5.4.270.0030.04019.02
5.4.260.0070.03319.23
5.4.250.0030.05318.89
5.4.240.0070.07319.04
5.4.230.0100.03318.89
5.4.220.0070.05319.15
5.4.210.0100.06318.98
5.4.200.0100.06719.12
5.4.190.0030.08018.93
5.4.180.0130.07019.11
5.4.170.0070.05018.86
5.4.160.0100.07319.01
5.4.150.0070.05318.92
5.4.140.0100.06716.38
5.4.130.0030.08016.24
5.4.120.0030.05316.48
5.4.110.0100.07316.48
5.4.100.0070.06716.52
5.4.90.0100.07016.52
5.4.80.0130.06016.54
5.4.70.0000.05716.53
5.4.60.0030.07316.40
5.4.50.0230.03716.41
5.4.40.0130.06716.41
5.4.30.0100.06716.40
5.4.20.0100.05316.39
5.4.10.0030.07716.44
5.4.00.0030.07315.94
5.3.290.0100.05014.66
5.3.280.0030.06014.72
5.3.270.0230.06014.76
5.3.260.0030.08714.61
5.3.250.0070.07314.60
5.3.240.0100.07314.68
5.3.230.0130.04714.63
5.3.220.0100.06714.63
5.3.210.0030.07314.69
5.3.200.0070.06714.51
5.3.190.0100.07014.50
5.3.180.0070.07314.68
5.3.170.0100.06714.61
5.3.160.0100.07314.68
5.3.150.0100.07014.64
5.3.140.0070.07714.71
5.3.130.0000.05314.67
5.3.120.0000.09714.62
5.3.110.0130.06714.58
5.3.100.0100.06714.12
5.3.90.0130.07013.93
5.3.80.0100.07314.03
5.3.70.0000.07314.18
5.3.60.0070.06714.05
5.3.50.0070.07014.07
5.3.40.0100.07314.02
5.3.30.0030.07013.84
5.3.20.0030.05013.86
5.3.10.0030.05013.78
5.3.00.0070.07713.71
5.2.170.0070.06011.78
5.2.160.0030.04711.78
5.2.150.0030.06311.78
5.2.140.0030.05311.78
5.2.130.0030.06011.78
5.2.120.0030.06011.78
5.2.110.0070.06311.78
5.2.100.0030.05311.78
5.2.90.0030.04711.78
5.2.80.0000.03311.78
5.2.70.0030.04011.78
5.2.60.0070.04711.78
5.2.50.0030.06011.78
5.2.40.0070.06311.78
5.2.30.0030.06711.78
5.2.20.0100.05711.78
5.2.10.0070.05711.78
5.2.00.0000.05311.78
5.1.60.0030.05311.78
5.1.50.0030.05011.78
5.1.40.0000.05011.78
5.1.30.0000.06311.78
5.1.20.0100.05711.78
5.1.10.0030.06011.78
5.1.00.0000.06011.78
5.0.50.0000.03311.78
5.0.40.0000.04711.78
5.0.30.0030.06711.78
5.0.20.0030.02311.78
5.0.10.0100.03711.78
5.0.00.0070.06011.78
4.4.90.0000.03711.78
4.4.80.0030.03011.78
4.4.70.0000.03711.78
4.4.60.0000.03711.78
4.4.50.0030.03011.78
4.4.40.0030.03311.78
4.4.30.0070.03311.78
4.4.20.0030.03711.78
4.4.10.0030.03711.78
4.4.00.0070.03311.78
4.3.110.0030.03311.78
4.3.100.0000.01711.78
4.3.90.0000.03711.78
4.3.80.0030.05011.78
4.3.70.0000.02311.78
4.3.60.0070.02311.78
4.3.50.0000.03711.78
4.3.40.0030.05311.78
4.3.30.0030.03711.78
4.3.20.0030.03711.78
4.3.10.0000.03711.78
4.3.00.0030.02311.78

preferences:
60.55 ms | 401 KiB | 5 Q