3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Math { const pi = 3.14; } class CircleMath extends Math { public static function calculateArea($radio) { return parent::pi * pow($radio, 2); } } class Circle { private $radio = '0.0'; private $color = <<<EOT red EOT; public function __construct($radio, $color) { $this->radio = $radio; $this->color = $color; } public function calculateArea() { return CircleMath::calculateArea($this->radio); } public function get_radio() { return $this->radio; } public function get_color() { return $this->color; } } $className = 'Circle'; $circle = new $className(6); echo sprintf('The area of %s circle with radio %s is: %s', $circle->get_color(), $circle->get_radio(), $circle->calculateArea()); ?>

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.0120.00318.93
8.3.30.0110.00418.65
8.3.20.0040.00418.90
8.3.10.0050.00321.14
8.3.00.0080.00019.79
8.2.170.0070.00722.96
8.2.160.0070.01020.38
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0000.00726.16
8.2.120.0040.00420.94
8.2.110.0060.00320.39
8.2.100.0110.00017.81
8.2.90.0080.00019.09
8.2.80.0030.00619.25
8.2.70.0060.00617.63
8.2.60.0000.00717.80
8.2.50.0030.00518.07
8.2.40.0020.00518.05
8.2.30.0040.00421.14
8.2.20.0040.00417.66
8.2.10.0070.00017.83
8.2.00.0040.00417.68
8.1.270.0040.00423.99
8.1.260.0140.00426.35
8.1.250.0020.00528.09
8.1.240.0060.00322.52
8.1.230.0070.00421.04
8.1.220.0040.00418.77
8.1.210.0000.00818.82
8.1.200.0030.00617.23
8.1.190.0080.00017.51
8.1.180.0050.00318.10
8.1.170.0070.00318.54
8.1.160.0040.00418.73
8.1.150.0040.00418.61
8.1.140.0040.00417.41
8.1.130.0000.00717.84
8.1.120.0030.00317.41
8.1.110.0040.00417.38
8.1.100.0080.00017.30
8.1.90.0040.00417.29
8.1.80.0070.00017.32
8.1.70.0030.00317.43
8.1.60.0000.00917.64
8.1.50.0040.00417.39
8.1.40.0040.00417.43
8.1.30.0030.00617.68
8.1.20.0040.00417.69
8.1.10.0000.00917.58
8.1.00.0000.00817.38
8.0.300.0000.00819.95
8.0.290.0040.00417.04
8.0.280.0030.00318.40
8.0.270.0000.00716.84
8.0.260.0040.00416.71
8.0.250.0000.00816.87
8.0.240.0000.00816.99
8.0.230.0000.00716.96
8.0.220.0030.00716.93
8.0.210.0030.00516.95
8.0.200.0030.00316.97
8.0.190.0040.00416.93
8.0.180.0040.00416.97
8.0.170.0000.00816.88
8.0.160.0070.00316.93
8.0.150.0030.00316.94
8.0.140.0050.00216.74
8.0.130.0000.00613.38
8.0.120.0040.00416.77
8.0.110.0000.00716.75
8.0.100.0040.00416.81
8.0.90.0000.00716.93
8.0.80.0060.01516.88
8.0.70.0050.00216.78
8.0.60.0040.00416.89
8.0.50.0030.00516.96
8.0.30.0090.00917.14
8.0.20.0160.00717.42
8.0.10.0000.00716.86
8.0.00.0070.01316.70
7.4.330.0000.00516.79
7.4.320.0000.00616.56
7.4.300.0040.00416.52
7.4.290.0070.00016.52
7.4.280.0030.00316.56
7.4.270.0040.00416.52
7.4.260.0030.00313.34
7.4.250.0020.00516.48
7.4.240.0000.00716.61
7.4.230.0070.00016.61
7.4.220.0000.01816.52
7.4.210.0080.00816.64
7.4.200.0000.00716.65
7.4.190.0040.00316.57
7.4.160.0110.00716.56
7.4.150.0110.00717.40
7.4.140.0170.00717.86
7.4.130.0120.00516.56
7.4.120.0090.00816.48
7.4.110.0150.00316.64
7.4.100.0140.00316.56
7.4.90.0060.01116.47
7.4.80.0110.00919.39
7.4.70.0070.01016.69
7.4.60.0120.00316.57
7.4.50.0030.00616.41
7.4.40.0100.00722.77
7.4.30.0080.00816.54
7.4.00.0060.00614.82
7.3.330.0020.00213.45
7.3.320.0060.00013.25
7.3.310.0020.00516.43
7.3.300.0000.00616.33
7.3.290.0040.01516.36
7.3.280.0080.00916.47
7.3.270.0070.01017.40
7.3.260.0110.00718.24
7.3.250.0080.01116.66
7.3.240.0140.00316.46
7.3.230.0160.00616.43
7.3.210.0160.00316.50
7.3.200.0170.00619.39
7.3.190.0060.01616.47
7.3.180.0170.00016.40
7.3.170.0030.01316.50
7.3.160.0070.01016.68
7.3.120.0030.01214.61
7.2.330.0100.00716.61
7.2.320.0030.01416.58
7.2.310.0110.00716.38
7.2.300.0130.00316.54
7.2.290.0060.01016.62
7.2.80.0040.01116.36
7.2.60.0040.00816.59
7.2.00.0060.00618.84
7.1.200.0030.01015.45
7.1.70.0040.00417.03
7.1.60.0000.01117.25
7.1.50.0070.01516.81
7.1.00.0030.03322.35
7.0.200.0030.01316.97
7.0.140.0100.06022.04
7.0.100.0130.04320.01
7.0.90.0200.08019.91
7.0.80.0230.07319.90
7.0.70.0130.09019.92
7.0.60.0100.08719.87
7.0.50.0100.05720.36
7.0.40.0030.08320.08
7.0.30.0030.08020.00
7.0.20.0100.04720.13
7.0.10.0030.05020.04
7.0.00.0130.07720.13
5.6.280.0070.07021.09
5.6.250.0100.08320.54
5.6.240.0130.07320.56
5.6.230.0030.08320.51
5.6.220.0030.08720.62
5.6.210.0200.05020.66
5.6.200.0070.08721.05
5.6.190.0000.06721.06
5.6.180.0130.07321.09
5.6.170.0070.07720.97
5.6.160.0070.07721.03
5.6.150.0100.04721.19
5.6.140.0030.08321.06
5.6.130.0070.08321.09
5.6.120.0100.08321.12
5.6.110.0030.09021.04
5.6.100.0100.07321.11
5.6.90.0030.05320.93
5.6.80.0100.07320.49
5.6.70.0070.03720.41
5.6.60.0130.07020.52
5.6.50.0000.09020.41
5.6.40.0100.08020.50
5.6.30.0130.03720.29
5.6.20.0100.08020.36
5.6.10.0030.08320.31
5.6.00.0070.08020.43
5.5.380.0100.08020.55
5.5.370.0070.04320.38
5.5.360.0070.08020.41
5.5.350.0100.07720.44
5.5.340.0030.05720.77
5.5.330.0070.09020.82
5.5.320.0070.08720.91
5.5.310.0130.08320.88
5.5.300.0130.07320.94
5.5.290.0030.05320.76
5.5.280.0100.08320.90
5.5.270.0100.08320.90
5.5.260.0130.07320.92
5.5.250.0070.07720.71
5.5.240.0070.07320.18
5.5.230.0000.06020.12
5.5.220.0000.07720.25
5.5.210.0130.06320.12
5.5.200.0000.08720.25
5.5.190.0070.07320.28
5.5.180.0130.07320.23
5.5.160.0170.07320.23
5.5.150.0200.05720.09
5.5.140.0030.04720.12
5.5.130.0100.05020.16
5.5.120.0030.04720.29
5.5.110.0130.07320.29
5.5.100.0100.08019.99
5.5.90.0000.06320.08
5.5.80.0100.07720.05
5.5.70.0070.08020.15
5.5.60.0100.07020.07
5.5.50.0130.07020.17
5.5.40.0170.05320.07
5.5.30.0070.08720.15
5.5.20.0170.06320.16
5.5.10.0030.08320.05
5.5.00.0130.07320.04
5.4.450.0070.07319.45
5.4.440.0070.08719.45
5.4.430.0100.06719.50
5.4.420.0070.08019.34
5.4.410.0130.05019.04
5.4.400.0070.06019.14
5.4.390.0070.05019.09
5.4.380.0130.07319.16
5.4.370.0030.05719.16
5.4.360.0030.08319.06
5.4.350.0100.07318.87
5.4.340.0030.04719.04
5.4.320.0030.07019.04
5.4.310.0100.07318.88
5.4.300.0030.08018.95
5.4.290.0130.06719.16
5.4.280.0070.05018.88
5.4.270.0200.06018.84
5.4.260.0070.07019.03
5.4.250.0070.06318.96
5.4.240.0100.06719.04
5.4.230.0030.05719.21
5.4.220.0030.08719.16
5.4.210.0000.05318.95
5.4.200.0100.07719.04
5.4.190.0100.04318.86
5.4.180.0070.07719.03
5.4.170.0070.04019.07
5.4.160.0100.07019.10
5.4.150.0100.05319.07
5.4.140.0100.04016.31
5.4.130.0100.07016.55
5.4.120.0070.07316.38
5.4.110.0200.06016.54
5.4.100.0130.07316.37
5.4.90.0030.07716.53
5.4.80.0100.07016.46
5.4.70.0000.05016.36
5.4.60.0130.06716.43
5.4.50.0100.06716.33
5.4.40.0070.04316.41
5.4.30.0030.07316.43
5.4.20.0100.06016.22
5.4.10.0100.07016.36
5.4.00.0070.07015.79
5.3.290.0070.03714.66
5.3.280.0070.07014.56
5.3.270.0070.04314.55
5.3.260.0030.06714.68
5.3.250.0100.06314.68
5.3.240.0130.06314.55
5.3.230.0070.05714.68
5.3.220.0230.06014.63
5.3.210.0100.06714.66
5.3.200.0100.07014.69
5.3.190.0070.07714.61
5.3.180.0130.07014.64
5.3.170.0000.07314.55
5.3.160.0100.07014.57
5.3.150.0130.07014.67
5.3.140.0100.07314.68
5.3.130.0130.06714.55
5.3.120.0030.08014.58
5.3.110.0070.07314.51
5.3.100.0130.06314.12
5.3.90.0100.05714.16
5.3.80.0070.07714.04
5.3.70.0200.06014.09
5.3.60.0070.05314.10
5.3.50.0070.07714.05
5.3.40.0070.07713.93
5.3.30.0100.07313.92
5.3.20.0100.06313.73
5.3.10.0030.07313.70
5.3.00.0130.05713.70
5.2.170.0000.06011.27
5.2.160.0030.06011.05
5.2.150.0000.04311.07
5.2.140.0000.06311.17
5.2.130.0070.06011.20
5.2.120.0100.05711.00
5.2.110.0100.05711.23
5.2.100.0030.05311.23
5.2.90.0030.03311.14
5.2.80.0030.06711.10
5.2.70.0170.04710.99
5.2.60.0030.03710.91
5.2.50.0030.06010.95
5.2.40.0130.05710.98
5.2.30.0030.06011.02
5.2.20.0000.03310.89
5.2.10.0000.06310.92
5.2.00.0070.06010.77
5.1.60.0070.05310.48
5.1.50.0000.06010.48
5.1.40.0030.05010.48
5.1.30.0030.06010.48
5.1.20.0100.04710.48
5.1.10.0070.04710.48
5.1.00.0130.04710.48
5.0.50.0030.03710.48
5.0.40.0100.04010.48
5.0.30.0000.06710.48
5.0.20.0070.04010.48
5.0.10.0030.04310.48
5.0.00.0070.06010.48
4.4.90.0030.03310.48
4.4.80.0030.03710.48
4.4.70.0000.03310.48
4.4.60.0000.02310.48
4.4.50.0000.03010.48
4.4.40.0030.05010.48
4.4.30.0000.03710.48
4.4.20.0000.04010.48
4.4.10.0000.03710.48
4.4.00.0030.05310.48
4.3.110.0000.03310.48
4.3.100.0000.04010.48
4.3.90.0030.03310.48
4.3.80.0030.05010.48
4.3.70.0030.02310.48
4.3.60.0030.01710.48
4.3.50.0030.02010.48
4.3.40.0030.03710.48
4.3.30.0000.03710.48
4.3.20.0000.03710.48
4.3.10.0030.01710.48
4.3.00.0070.03310.48

preferences:
40.67 ms | 400 KiB | 5 Q