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 $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->radio); } public function get_radius() { return $this->radio; } 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()); ?>

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.0130.00718.46
8.3.50.0110.00722.13
8.3.40.0120.00318.87
8.3.30.0070.00719.04
8.3.20.0000.00720.38
8.3.10.0040.00423.60
8.3.00.0040.00422.43
8.2.180.0120.00616.50
8.2.170.0100.01018.98
8.2.160.0120.00922.96
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0120.00626.16
8.2.120.0000.00722.12
8.2.110.0060.00322.27
8.2.100.0160.00217.87
8.2.90.0030.00519.18
8.2.80.0000.00817.97
8.2.70.0050.00317.63
8.2.60.0030.00518.05
8.2.50.0060.00318.07
8.2.40.0000.00818.05
8.2.30.0040.00418.05
8.2.20.0000.00817.79
8.2.10.0030.00519.41
8.2.00.0030.00517.75
8.1.280.0000.01525.92
8.1.270.0040.00421.95
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.01423.92
8.1.230.0120.00019.07
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0070.00317.36
8.1.190.0060.00317.54
8.1.180.0040.00418.10
8.1.170.0040.00418.53
8.1.160.0040.00322.01
8.1.150.0000.00718.74
8.1.140.0030.00617.46
8.1.130.0040.00417.84
8.1.120.0000.00717.53
8.1.110.0040.00417.34
8.1.100.0000.00717.46
8.1.90.0050.00317.48
8.1.80.0040.00417.48
8.1.70.0000.00717.47
8.1.60.0060.00317.48
8.1.50.0030.00617.60
8.1.40.0070.00017.42
8.1.30.0050.00317.58
8.1.20.0050.00317.64
8.1.10.0070.00017.46
8.1.00.0000.00717.41
8.0.300.0030.00318.77
8.0.290.0000.00717.18
8.0.280.0050.00318.41
8.0.270.0030.00317.29
8.0.260.0050.00216.80
8.0.250.0000.00616.91
8.0.240.0080.00016.93
8.0.230.0050.00217.04
8.0.220.0040.00416.88
8.0.210.0000.00816.99
8.0.200.0030.00316.99
8.0.190.0030.00617.03
8.0.180.0030.00516.98
8.0.170.0000.00717.04
8.0.160.0040.00416.87
8.0.150.0070.00016.93
8.0.140.0040.00416.90
8.0.130.0030.00313.40
8.0.120.0000.00716.94
8.0.110.0000.00816.85
8.0.100.0040.00416.83
8.0.90.0040.00417.00
8.0.80.0000.01917.01
8.0.70.0050.00217.01
8.0.60.0000.00716.77
8.0.50.0020.00516.93
8.0.30.0060.01417.01
8.0.20.0120.00617.40
8.0.10.0000.00717.11
8.0.00.0100.01216.72
7.4.330.0020.00215.02
7.4.320.0060.00016.48
7.4.300.0000.00616.65
7.4.290.0080.00016.38
7.4.280.0030.00316.64
7.4.270.0000.00816.47
7.4.260.0070.00016.63
7.4.250.0040.00416.48
7.4.240.0020.00616.52
7.4.230.0030.00316.59
7.4.220.0070.01116.57
7.4.210.0080.00716.54
7.4.200.0000.00716.72
7.4.190.0000.00716.68
7.4.160.0080.00816.63
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0120.00516.61
7.4.120.0110.00616.53
7.4.110.0170.00416.53
7.4.100.0150.00616.69
7.4.90.0060.01216.55
7.4.80.0120.00419.39
7.4.70.0110.00716.55
7.4.60.0130.00516.48
7.4.50.0040.00416.52
7.4.40.0090.00622.77
7.4.30.0140.00316.54
7.4.00.0090.00615.10
7.3.330.0030.00313.45
7.3.320.0050.00013.47
7.3.310.0040.00416.49
7.3.300.0070.00016.41
7.3.290.0070.01316.46
7.3.280.0110.00516.45
7.3.270.0100.00717.40
7.3.260.0070.01316.44
7.3.250.0110.01116.37
7.3.240.0100.00616.49
7.3.230.0030.01316.39
7.3.210.0110.00616.68
7.3.200.0030.01619.39
7.3.190.0090.00616.47
7.3.180.0040.01216.48
7.3.170.0150.00016.47
7.3.160.0090.00616.67
7.3.120.0020.01514.94
7.3.110.0120.00315.07
7.3.100.0060.01214.83
7.3.90.0110.00414.95
7.3.80.0050.00514.92
7.3.70.0040.01114.65
7.3.60.0060.00914.85
7.3.50.0060.00614.93
7.3.40.0070.00314.99
7.3.30.0160.00014.62
7.3.20.0120.00316.71
7.3.10.0060.01016.68
7.3.00.0030.01316.48
7.2.330.0120.00616.79
7.2.320.0090.01316.78
7.2.310.0100.01416.45
7.2.300.0130.00416.75
7.2.290.0060.01016.57
7.2.250.0090.00615.25
7.2.240.0060.01315.10
7.2.230.0130.00315.20
7.2.220.0040.01115.12
7.2.210.0070.00415.26
7.2.200.0030.01215.04
7.2.190.0110.00414.85
7.2.180.0000.01415.31
7.2.170.0050.00815.07
7.2.00.0030.00919.19
7.1.330.0070.00715.76
7.1.320.0110.00615.68
7.1.310.0040.00815.61
7.1.300.0040.00715.84
7.1.290.0000.01415.89
7.1.280.0130.00015.86
7.1.270.0070.00715.95
7.1.260.0030.00715.84
7.1.100.0000.01718.22
7.1.70.0000.01217.10
7.1.60.0070.01719.29
7.1.50.0070.01717.05
7.1.00.0070.07322.45
7.0.200.0080.00316.93
7.0.140.0000.07022.15
7.0.60.0070.08320.05
7.0.50.0130.07317.75
7.0.40.0070.08720.29
7.0.30.0270.07720.08
7.0.20.0170.04320.08
7.0.10.0270.03720.15
7.0.00.0130.07320.07
5.6.280.0030.07321.11
5.6.210.0100.08020.55
5.6.200.0000.04318.14
5.6.190.0070.04020.45
5.6.180.0100.07320.67
5.6.170.0230.06720.52
5.6.160.0100.08320.61
5.6.150.0130.07018.16
5.6.140.0100.06318.14
5.6.130.0070.08318.16
5.6.120.0070.08320.98
5.6.110.0070.04021.14
5.6.100.0070.08721.12
5.6.90.0100.08321.01
5.6.80.0200.07020.51
5.6.70.0330.07020.39
5.5.350.0030.05720.42
5.5.340.0030.05018.05
5.5.330.0130.07020.28
5.5.320.0000.05720.24
5.5.310.0370.06020.25
5.5.300.0100.06717.95
5.5.290.0070.08017.95
5.5.280.0030.04320.78
5.5.270.0100.08320.78
5.5.260.0030.04020.89
5.5.250.0100.06320.60
5.5.240.0100.05720.38
5.4.450.0870.03319.47
5.4.440.0700.07319.55
5.4.430.0330.07719.46
5.4.420.0770.04719.30
5.4.410.0300.05319.57
5.4.400.0300.06719.31
5.4.390.0770.06019.23
5.4.380.0200.04718.74
5.4.370.0170.06718.80
5.4.360.0230.04318.73
5.4.350.0200.05018.76
5.4.340.0200.04718.74
5.4.320.0050.03912.52
5.4.310.0040.04112.52
5.4.300.0080.03512.51
5.4.290.0060.03812.51
5.4.280.0090.04212.41
5.4.270.0100.04612.40
5.4.260.0110.04712.41
5.4.250.0050.03812.41
5.4.240.0120.02912.41
5.4.230.0050.03912.40
5.4.220.0060.04212.40
5.4.210.0070.03912.40
5.4.200.0270.06212.38
5.4.190.0180.04012.38
5.4.180.0100.04812.38
5.4.170.0160.04212.39
5.4.160.0140.04512.38
5.4.150.0180.04212.38
5.4.140.0230.03512.07
5.4.130.0170.04112.05
5.4.120.0110.04612.01
5.4.110.0120.04512.00
5.4.100.0150.04312.00
5.4.90.0140.04412.00
5.4.80.0200.03812.00
5.4.70.0180.03912.00
5.4.60.0150.04212.00
5.4.50.0110.04612.00
5.4.40.0150.04211.99
5.4.30.0150.04411.99
5.4.20.0170.04211.99
5.4.10.0140.04311.99
5.4.00.0140.04311.48
5.3.290.0070.04712.80
5.3.280.0050.03912.71
5.3.270.0170.05412.72
5.3.260.0170.04412.72
5.3.250.0130.05512.72
5.3.240.0340.08712.72
5.3.230.0190.04312.71
5.3.220.0180.04312.68
5.3.210.0190.04312.68
5.3.200.0200.04012.68
5.3.190.0130.04812.68
5.3.180.0150.04512.67
5.3.170.0150.04512.67
5.3.160.0170.04712.67
5.3.150.0170.04512.67
5.3.140.0150.04812.66
5.3.130.0180.04812.66
5.3.120.0480.08312.66
5.3.110.0200.04312.66
5.3.100.0170.04612.12
5.3.90.0370.08412.10
5.3.80.0190.04212.07
5.3.70.0170.04312.07
5.3.60.0180.04212.06
5.3.50.0170.04212.01
5.3.40.0140.04512.01
5.3.30.0170.04011.98
5.3.20.0160.04211.76
5.3.10.0180.04011.72
5.3.00.0140.04611.70
5.2.170.0210.0359.21
5.2.160.0190.0309.21
5.2.150.0200.0329.21
5.2.140.0140.0379.20
5.2.130.0350.0729.17
5.2.120.0160.0339.17
5.2.110.0140.0349.17
5.2.100.0120.0399.18
5.2.90.0160.0329.18
5.2.80.0120.0379.17
5.2.70.0140.0339.16
5.2.60.0180.0299.11
5.2.50.0290.0789.09
5.2.40.0160.0319.06
5.2.30.0080.0389.04
5.2.20.0120.0349.04
5.2.10.0140.0338.94
5.2.00.0160.0298.79
5.1.60.0120.0278.08
5.1.50.0180.0238.07
5.1.40.0130.0278.07
5.1.30.0060.0368.41
5.1.20.0080.0348.44
5.1.10.0140.0298.15
5.1.00.0180.0248.15
5.0.50.0070.0266.64
5.0.40.0160.0166.50
5.0.30.0080.0366.31
5.0.20.0100.0216.30
5.0.10.0110.0216.28
5.0.00.0070.0376.27
4.4.90.0070.0174.78
4.4.80.0080.0164.75
4.4.70.0100.0154.75
4.4.60.0070.0194.75
4.4.50.0070.0184.77
4.4.40.0070.0284.71
4.4.30.0200.0364.75
4.4.20.0070.0184.84
4.4.10.0070.0194.85
4.4.00.0090.0264.76
4.3.110.0060.0184.67
4.3.100.0070.0174.67
4.3.90.0030.0214.63
4.3.80.0080.0284.58
4.3.70.0050.0194.63
4.3.60.0060.0194.63
4.3.50.0060.0184.63
4.3.40.0030.0304.54
4.3.30.0040.0193.30
4.3.20.0030.0203.27
4.3.10.0030.0203.24
4.3.00.0030.01313.43

preferences:
39.1 ms | 401 KiB | 5 Q