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; private $color; private $coordinates; public function __construct($radio, $color = 'purple', $coordinates = array('x' => 0, 'y' => 0)) { $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(); 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.60.0110.00418.43
8.3.50.0090.01121.15
8.3.40.0040.01818.83
8.3.30.0070.00718.87
8.3.20.0060.00318.69
8.3.10.0000.00721.14
8.3.00.0080.00019.56
8.2.180.0040.01116.63
8.2.170.0040.01122.96
8.2.160.0110.00421.95
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00021.11
8.2.110.0060.00320.92
8.2.100.0040.00817.91
8.2.90.0050.00317.91
8.2.80.0030.00517.97
8.2.70.0090.00017.75
8.2.60.0040.00417.80
8.2.50.0060.00318.07
8.2.40.0030.00518.22
8.2.30.0040.00421.27
8.2.20.0000.00717.75
8.2.10.0040.00417.66
8.2.00.0080.00017.77
8.1.280.0130.00625.92
8.1.270.0080.00023.99
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0060.00322.14
8.1.230.0040.00820.86
8.1.220.0040.00417.74
8.1.210.0030.00620.29
8.1.200.0040.00717.22
8.1.190.0000.00717.41
8.1.180.0030.00518.10
8.1.170.0000.00818.43
8.1.160.0050.00218.90
8.1.150.0040.00418.64
8.1.140.0040.00417.41
8.1.130.0030.00317.81
8.1.120.0050.00217.45
8.1.110.0070.00017.46
8.1.100.0000.00817.46
8.1.90.0040.00417.46
8.1.80.0040.00417.48
8.1.70.0000.00717.30
8.1.60.0030.00617.59
8.1.50.0070.00017.39
8.1.40.0040.00417.50
8.1.30.0080.00017.50
8.1.20.0030.00617.61
8.1.10.0000.00817.48
8.1.00.0000.00817.55
8.0.300.0070.00020.15
8.0.290.0040.00416.63
8.0.280.0070.00018.32
8.0.270.0030.00517.22
8.0.260.0030.00316.86
8.0.250.0030.00516.88
8.0.240.0040.00416.86
8.0.230.0000.00717.00
8.0.220.0090.00016.84
8.0.210.0000.00816.86
8.0.200.0030.00317.03
8.0.190.0070.00016.87
8.0.180.0030.00516.89
8.0.170.0000.00716.82
8.0.160.0040.00416.99
8.0.150.0080.00016.89
8.0.140.0050.00316.89
8.0.130.0060.00013.38
8.0.120.0000.00816.89
8.0.110.0040.00416.99
8.0.100.0050.00316.74
8.0.90.0000.00716.79
8.0.80.0130.00316.80
8.0.70.0000.00816.95
8.0.60.0000.00817.01
8.0.50.0040.00416.80
8.0.30.0060.01417.02
8.0.20.0100.01217.40
8.0.10.0050.00316.86
8.0.00.0110.00716.87
7.4.330.0020.00216.79
7.4.320.0000.00816.48
7.4.300.0000.00616.68
7.4.290.0070.00016.48
7.4.280.0040.00416.54
7.4.270.0000.00616.54
7.4.260.0030.00313.22
7.4.250.0040.00416.64
7.4.240.0000.00716.49
7.4.230.0070.00016.38
7.4.220.0160.00316.52
7.4.210.0070.00816.56
7.4.200.0070.00016.70
7.4.190.0000.00716.53
7.4.160.0080.01116.59
7.4.150.0170.00817.40
7.4.140.0130.00417.86
7.4.130.0060.01516.62
7.4.120.0100.00716.58
7.4.110.0190.00316.43
7.4.100.0100.01016.52
7.4.90.0110.00816.44
7.4.80.0070.01019.39
7.4.70.0140.00316.66
7.4.60.0100.01016.51
7.4.50.0000.00816.66
7.4.40.0040.01122.77
7.4.30.0160.00316.71
7.4.00.0040.01214.69
7.3.330.0060.00013.45
7.3.320.0000.00713.45
7.3.310.0030.00316.35
7.3.300.0060.00016.31
7.3.290.0080.01216.46
7.3.280.0100.01216.41
7.3.270.0070.01117.40
7.3.260.0100.00718.24
7.3.250.0070.01316.63
7.3.240.0030.01316.63
7.3.230.0140.00416.44
7.3.210.0090.01216.37
7.3.200.0100.00719.39
7.3.190.0190.00316.32
7.3.180.0170.00316.66
7.3.170.0100.00616.58
7.3.160.0090.01216.46
7.3.120.0120.00314.85
7.2.330.0120.00616.54
7.2.320.0060.01216.38
7.2.310.0040.01516.27
7.2.300.0120.00616.22
7.2.290.0100.00716.59
7.2.60.0060.00916.57
7.2.00.0090.00619.10
7.1.200.0110.00815.43
7.1.70.0000.01017.18
7.1.60.0000.01117.25
7.1.50.0070.01416.81
7.1.00.0000.03722.44
7.0.200.0060.01016.68
7.0.140.0000.07722.18
7.0.100.0130.08019.99
7.0.90.0100.07719.99
7.0.80.0030.07319.91
7.0.70.0130.07319.98
7.0.60.0100.08319.97
7.0.50.0130.08020.30
7.0.40.0230.04020.06
7.0.30.0070.08320.10
7.0.20.0030.08319.95
7.0.10.0170.07320.04
7.0.00.0000.08319.95
5.6.280.0030.07320.91
5.6.250.0170.07020.77
5.6.240.0070.06720.58
5.6.230.0270.06720.67
5.6.220.0130.03720.71
5.6.210.0200.06720.57
5.6.200.0030.09321.09
5.6.190.0100.07721.13
5.6.180.0070.07721.04
5.6.170.0070.05321.05
5.6.160.0200.07021.06
5.6.150.0070.08721.06
5.6.140.0030.07021.09
5.6.130.0070.05021.05
5.6.120.0130.08321.04
5.6.110.0200.07021.12
5.6.100.0130.07721.08
5.6.90.0130.07720.91
5.6.80.0070.08320.47
5.6.70.0030.08720.45
5.6.60.0100.07020.41
5.6.50.0200.07720.39
5.6.40.0030.08720.45
5.6.30.0070.07720.45
5.6.20.0130.07720.38
5.6.10.0030.08320.38
5.6.00.0100.03320.31
5.5.380.0130.07320.37
5.5.370.0100.07720.39
5.5.360.0070.07720.40
5.5.350.0070.08020.44
5.5.340.0130.07320.89
5.5.330.0200.07320.95
5.5.320.0100.08320.89
5.5.310.0070.07720.77
5.5.300.0170.07720.92
5.5.290.0070.07720.79
5.5.280.0100.08320.88
5.5.270.0100.07320.84
5.5.260.0030.06320.89
5.5.250.0100.07720.63
5.5.240.0100.07720.27
5.5.230.0100.05320.19
5.5.220.0070.05020.30
5.5.210.0130.07020.22
5.5.200.0100.07720.23
5.5.190.0030.05320.29
5.5.180.0000.05020.25
5.5.160.0030.08020.15
5.5.150.0070.04320.22
5.5.140.0100.04320.09
5.5.130.0030.08320.16
5.5.120.0170.04020.16
5.5.110.0100.07320.20
5.5.100.0030.05720.18
5.5.90.0070.03719.98
5.5.80.0030.04720.15
5.5.70.0100.03320.10
5.5.60.0130.03019.98
5.5.50.0000.04720.11
5.5.40.0070.03320.10
5.5.30.0030.04020.12
5.5.20.0030.04720.11
5.5.10.0030.05319.95
5.5.00.0070.06720.11
5.4.450.0100.07719.43
5.4.440.0100.07719.37
5.4.430.0100.07719.48
5.4.420.0000.06019.37
5.4.410.0070.08319.24
5.4.400.0200.06019.04
5.4.390.0030.05319.13
5.4.380.0100.07019.04
5.4.370.0100.07319.12
5.4.360.0030.07719.21
5.4.350.0030.05319.09
5.4.340.0130.08719.14
5.4.320.0130.04018.88
5.4.310.0070.04719.16
5.4.300.0070.04719.23
5.4.290.0130.07018.87
5.4.280.0130.07019.21
5.4.270.0100.07319.15
5.4.260.0100.06319.05
5.4.250.0100.04718.84
5.4.240.0000.04018.87
5.4.230.0000.04019.13
5.4.220.0100.04718.87
5.4.210.0000.04019.02
5.4.200.0000.04019.04
5.4.190.0000.04319.15
5.4.180.0070.05019.15
5.4.170.0030.04019.04
5.4.160.0000.03719.14
5.4.150.0070.06018.83
5.4.140.0070.03716.48
5.4.130.0070.03016.46
5.4.120.0200.05016.46
5.4.110.0000.04316.45
5.4.100.0070.03316.45
5.4.90.0030.03316.48
5.4.80.0030.03716.33
5.4.70.0070.03316.55
5.4.60.0070.03316.52
5.4.50.0000.04016.52
5.4.40.0030.03316.45
5.4.30.0030.03316.44
5.4.20.0030.03716.37
5.4.10.0070.07316.48
5.4.00.0070.03315.88
5.3.290.0070.05014.63
5.3.280.0100.03314.59
5.3.270.0030.03314.59
5.3.260.0030.03714.75
5.3.250.0170.04314.64
5.3.240.0030.03714.55
5.3.230.0100.03714.55
5.3.220.0000.04014.64
5.3.210.0100.03014.59
5.3.200.0030.03714.57
5.3.190.0030.03714.61
5.3.180.0030.03314.72
5.3.170.0070.04014.60
5.3.160.0030.03314.58
5.3.150.0030.03714.64
5.3.140.0030.03714.63
5.3.130.0030.04014.49
5.3.120.0030.06314.68
5.3.110.0030.03714.54
5.3.100.0030.05714.16
5.3.90.0030.04714.16
5.3.80.0000.04013.95
5.3.70.0000.07314.02
5.3.60.0030.04014.03
5.3.50.0000.04314.08
5.3.40.0000.04014.01
5.3.30.0070.04013.94
5.3.20.0030.03313.63
5.3.10.0070.03013.57
5.3.00.0030.05313.59
5.2.170.0030.03011.27
5.2.160.0000.03311.19
5.2.150.0030.03011.25
5.2.140.0070.02311.07
5.2.130.0000.03011.10
5.2.120.0030.02311.04
5.2.110.0000.03011.04
5.2.100.0030.04311.20
5.2.90.0000.04011.10
5.2.80.0030.04311.18
5.2.70.0030.03711.17
5.2.60.0030.06711.13
5.2.50.0130.05311.15
5.2.40.0000.06011.07
5.2.30.0130.04711.08
5.2.20.0100.05311.09
5.2.10.0070.04711.04
5.2.00.0070.05311.04
5.1.60.0030.05011.04
5.1.50.0000.03711.04
5.1.40.0070.02711.04
5.1.30.0030.05711.04
5.1.20.0070.05711.04
5.1.10.0030.05311.04
5.1.00.0070.05311.04
5.0.50.0070.04311.04
5.0.40.0030.03711.04
5.0.30.0030.06311.04
5.0.20.0070.04011.04
5.0.10.0000.04711.04
5.0.00.0070.05711.04
4.4.90.0030.03311.04
4.4.80.0000.04011.04
4.4.70.0030.03311.04
4.4.60.0000.02711.04
4.4.50.0000.02011.04
4.4.40.0030.04711.04
4.4.30.0030.01711.04
4.4.20.0000.03711.04
4.4.10.0000.03011.04
4.4.00.0000.05011.04
4.3.110.0030.02711.04
4.3.100.0000.03711.04
4.3.90.0000.03311.04
4.3.80.0030.05011.04
4.3.70.0030.03311.04
4.3.60.0000.03711.04
4.3.50.0070.01711.04
4.3.40.0030.05011.04
4.3.30.0030.03311.04
4.3.20.0030.03311.04
4.3.10.0000.04011.04
4.3.00.0030.03711.04

preferences:
43.84 ms | 401 KiB | 5 Q