3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Math { const pi = 3.14; } class CircleMath extends Math { public static function calculateArea($radius) { return parent::pi * pow($radius, 2); } } class Circle { private $radius; private $color; private $coordinates; public function __construct($radius = 1, $color = 'blue', $coordinates = array('x' => 0, 'y' => 0)) { $this->radius = $radius; $this->color = $color; $this->coordinates = $coordinates; } public function calculateArea() { return CircleMath::calculateArea($this->radius); } public function get_radius() { return $this->radius; } public function get_color() { return $this->color; } public function get_coordinates() { return $this->coordinates; } } $className = 'Circle'; $circle = new $className(); echo sprintf('The area of %s circle with radius %s and center positioned in (%s, %s) is: %s', $circle->get_color(), $circle->get_radius(), $circle->get_coordinates()['x'], $circle->get_coordinates()['y'], $circle->calculateArea()); $arguments = array(); echo $array[1]; ?>

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.0090.00618.93
8.3.30.0180.00018.79
8.3.20.0000.00818.91
8.3.10.0050.00321.01
8.3.00.0080.00019.80
8.2.170.0140.00022.96
8.2.160.0100.01020.45
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0050.00326.16
8.2.120.0070.00021.01
8.2.110.0060.00322.07
8.2.100.0060.00617.97
8.2.90.0070.00019.40
8.2.80.0020.00519.38
8.2.70.0030.00517.75
8.2.60.0090.00018.16
8.2.50.0040.00418.07
8.2.40.0000.00817.97
8.2.30.0070.00019.41
8.2.20.0030.00517.68
8.2.10.0040.00417.83
8.2.00.0000.00817.71
8.1.270.0060.00323.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.42
8.1.230.0110.00020.89
8.1.220.0040.00418.77
8.1.210.0000.00818.96
8.1.200.0060.00317.38
8.1.190.0040.00417.53
8.1.180.0090.00018.10
8.1.170.0070.00318.53
8.1.160.0050.00218.86
8.1.150.0000.00718.64
8.1.140.0000.00717.45
8.1.130.0040.00417.85
8.1.120.0000.00817.54
8.1.110.0000.00717.38
8.1.100.0040.00417.51
8.1.90.0080.00017.38
8.1.80.0050.00217.39
8.1.70.0030.00317.36
8.1.60.0030.00517.60
8.1.50.0050.00217.37
8.1.40.0050.00217.54
8.1.30.0050.00317.55
8.1.20.0030.00617.56
8.1.10.0050.00217.59
8.1.00.0030.00517.40
8.0.300.0070.00019.89
8.0.290.0030.00617.05
8.0.280.0040.00418.33
8.0.270.0080.00017.27
8.0.260.0030.00316.89
8.0.250.0080.00416.94
8.0.240.0080.00017.02
8.0.230.0070.00017.07
8.0.220.0100.00017.01
8.0.210.0080.00017.00
8.0.200.0060.00017.03
8.0.190.0000.00716.89
8.0.180.0040.00416.86
8.0.170.0040.00416.89
8.0.160.0030.00616.87
8.0.150.0040.00416.91
8.0.140.0070.00016.91
8.0.130.0030.00313.46
8.0.120.0040.00417.00
8.0.110.0040.00416.98
8.0.100.0040.00416.99
8.0.90.0000.00816.83
8.0.80.0060.01216.91
8.0.70.0030.00516.84
8.0.60.0050.00217.04
8.0.50.0040.00417.03
8.0.30.0210.00517.11
8.0.20.0110.00717.40
8.0.10.0000.00816.94
8.0.00.0140.00816.93
7.4.330.0050.00016.84
7.4.320.0060.00316.54
7.4.300.0030.00316.66
7.4.290.0000.00716.61
7.4.280.0040.00416.52
7.4.270.0070.00016.45
7.4.260.0030.00313.32
7.4.250.0020.00516.48
7.4.240.0000.00716.50
7.4.230.0050.00316.51
7.4.220.0130.01016.59
7.4.210.0090.00816.65
7.4.200.0000.00816.52
7.4.190.0040.00416.65
7.4.160.0030.01316.54
7.4.150.0100.01017.40
7.4.140.0130.00317.86
7.4.130.0110.00716.51
7.4.120.0120.00716.42
7.4.110.0160.00316.63
7.4.100.0100.00616.61
7.4.90.0130.00316.64
7.4.80.0070.01319.39
7.4.70.0090.00616.43
7.4.60.0110.00616.56
7.4.50.0000.00916.37
7.4.40.0090.00322.77
7.4.30.0100.00716.68
7.4.00.0070.00415.20
7.3.330.0000.00513.46
7.3.320.0030.00313.39
7.3.310.0040.00416.35
7.3.300.0030.00316.50
7.3.290.0000.01416.39
7.3.280.0080.01016.48
7.3.270.0130.01017.40
7.3.260.0120.01218.24
7.3.250.0140.00616.71
7.3.240.0030.01716.42
7.3.230.0120.00616.56
7.3.210.0100.00716.41
7.3.200.0030.01419.39
7.3.190.0170.00316.52
7.3.180.0070.01316.63
7.3.170.0100.00616.57
7.3.160.0080.00816.67
7.3.120.0070.00715.08
7.2.330.0040.01416.83
7.2.320.0160.00316.79
7.2.310.0070.01416.71
7.2.300.0120.00616.79
7.2.290.0110.00716.68
7.1.70.0050.00517.07
7.1.60.0000.01117.06
7.1.50.0070.01117.00
7.1.00.0030.03322.41
7.0.200.0040.01116.84
7.0.140.0070.07022.09
7.0.100.0100.05020.02
7.0.90.0030.08720.01
7.0.80.0100.07019.88
7.0.70.0130.07319.98
7.0.60.0070.07719.93
7.0.50.0130.08020.18
7.0.40.0100.08320.16
7.0.30.0100.07720.11
7.0.20.0130.07720.01
7.0.10.0100.08320.09
7.0.00.0130.08020.12
5.6.280.0000.07721.12
5.6.250.0130.07320.54
5.6.240.0130.07320.64
5.6.230.0070.06020.62
5.6.220.0100.08020.63
5.6.210.0100.07720.47
5.6.200.0070.07721.15
5.6.190.0070.08021.11
5.6.180.0030.08321.11
5.6.170.0030.08021.01
5.6.160.0030.05321.05
5.6.150.0130.08021.07
5.6.140.0100.08020.94
5.6.130.0100.07720.96
5.6.120.0130.08321.07
5.6.110.0070.07721.10
5.6.100.0000.06021.06
5.6.90.0130.08021.07
5.6.80.0100.07720.47
5.6.70.0030.07020.43
5.6.60.0030.06320.40
5.6.50.0100.07320.45
5.6.40.0000.08020.41
5.6.30.0070.08320.39
5.6.20.0100.07720.53
5.6.10.0170.07020.37
5.6.00.0030.07320.45
5.5.380.0030.08020.52
5.5.370.0170.07020.41
5.5.360.0130.07720.36
5.5.350.0130.07020.45
5.5.340.0030.08320.64
5.5.330.0030.08320.92
5.5.320.0030.07320.83
5.5.310.0130.07720.92
5.5.300.0000.09020.88
5.5.290.0070.08020.64
5.5.280.0030.07720.75
5.5.270.0100.07320.77
5.5.260.0200.07020.79
5.5.250.0000.08720.72
5.5.240.0030.05020.19
5.5.230.0070.08020.14
5.5.220.0030.05020.20
5.5.210.0100.07720.14
5.5.200.0100.05720.23
5.5.190.0070.08720.21
5.5.180.0030.07320.28
5.5.160.0030.05020.23
5.5.150.0130.07320.16
5.5.140.0130.07020.23
5.5.130.0000.07020.23
5.5.120.0130.07020.15
5.5.110.0070.05020.21
5.5.100.0100.06720.11
5.5.90.0070.07720.04
5.5.80.0030.08020.13
5.5.70.0070.04320.09
5.5.60.0070.07020.15
5.5.50.0200.06320.16
5.5.40.0200.06720.09
5.5.30.0070.08020.05
5.5.20.0070.04020.04
5.5.10.0200.04320.13
5.5.00.0070.08020.06
5.4.450.0100.08019.35
5.4.440.0170.07319.46
5.4.430.0100.04019.27
5.4.420.0070.06019.36
5.4.410.0100.07719.40
5.4.400.0070.07719.05
5.4.390.0030.07719.04
5.4.380.0170.06719.16
5.4.370.0200.05719.10
5.4.360.0170.06719.02
5.4.350.0030.07718.89
5.4.340.0000.08319.04
5.4.320.0070.06719.16
5.4.310.0030.07319.20
5.4.300.0000.07719.03
5.4.290.0130.06319.11
5.4.280.0100.07719.05
5.4.270.0070.07319.12
5.4.260.0200.06719.16
5.4.250.0100.07019.02
5.4.240.0070.04019.09
5.4.230.0070.06719.02
5.4.220.0130.07019.04
5.4.210.0100.07718.93
5.4.200.0130.07318.91
5.4.190.0100.07019.04
5.4.180.0070.08019.11
5.4.170.0130.06019.11
5.4.160.0000.05718.88
5.4.150.0170.07019.02
5.4.140.0100.07316.51
5.4.130.0070.04716.46
5.4.120.0000.07716.45
5.4.110.0100.07016.44
5.4.100.0070.07316.46
5.4.90.0070.06016.37
5.4.80.0000.07316.54
5.4.70.0130.06716.46
5.4.60.0070.05016.47
5.4.50.0070.07716.42
5.4.40.0070.07016.47
5.4.30.0170.07016.30
5.4.20.0100.04316.41
5.4.10.0070.05316.39
5.4.00.0070.03315.86
5.3.290.0030.07714.68
5.3.280.0000.04014.66
5.3.270.0100.07714.63
5.3.260.0030.08014.54
5.3.250.0000.07314.73
5.3.240.0070.06314.70
5.3.230.0100.07014.53
5.3.220.0030.07714.68
5.3.210.0030.08014.68
5.3.200.0130.03714.71
5.3.190.0170.07314.57
5.3.180.0030.07714.64
5.3.170.0030.08014.64
5.3.160.0100.05014.71
5.3.150.0030.06314.59
5.3.140.0070.04314.58
5.3.130.0070.07714.70
5.3.120.0030.05714.65
5.3.110.0200.06714.65
5.3.100.0130.05713.97
5.3.90.0000.04014.14
5.3.80.0030.03714.17
5.3.70.0070.06014.01
5.3.60.0100.06313.95
5.3.50.0200.06313.99
5.3.40.0230.05013.96
5.3.30.0100.05013.90
5.3.20.0100.06713.76
5.3.10.0070.07313.60
5.3.00.0100.05713.66
5.2.170.0100.06011.55
5.2.160.0100.05311.55
5.2.150.0070.04711.55
5.2.140.0130.05711.55
5.2.130.0000.06311.55
5.2.120.0030.06311.55
5.2.110.0070.06311.55
5.2.100.0030.05711.55
5.2.90.0030.03711.55
5.2.80.0100.06011.55
5.2.70.0170.04711.55
5.2.60.0070.06011.55
5.2.50.0030.06311.55
5.2.40.0070.05711.55
5.2.30.0030.05711.55
5.2.20.0070.06311.55
5.2.10.0030.04311.55
5.2.00.0030.05711.55
5.1.60.0000.05311.55
5.1.50.0000.05711.55
5.1.40.0070.05011.55
5.1.30.0100.05011.55
5.1.20.0030.05011.55
5.1.10.0030.04011.55
5.1.00.0100.03311.55
5.0.50.0100.04011.55
5.0.40.0070.03711.55
5.0.30.0100.05711.55
5.0.20.0000.04311.55
5.0.10.0030.04711.55
5.0.00.0070.06011.55
4.4.90.0070.03311.55
4.4.80.0070.03011.55
4.4.70.0030.03311.55
4.4.60.0070.01311.55
4.4.50.0030.02311.55
4.4.40.0000.05711.55
4.4.30.0000.03711.55
4.4.20.0030.03311.55
4.4.10.0030.03311.55
4.4.00.0000.04711.55
4.3.110.0030.03311.55
4.3.100.0000.03711.55
4.3.90.0000.04011.55
4.3.80.0030.02711.55
4.3.70.0000.03011.55
4.3.60.0000.01711.55
4.3.50.0000.03711.55
4.3.40.0030.05311.55
4.3.30.0030.03011.55
4.3.20.0000.03711.55
4.3.10.0000.03711.55
4.3.00.0000.03011.55

preferences:
41.52 ms | 400 KiB | 5 Q