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='blue') { $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.60.0140.00318.56
8.3.50.0060.01221.92
8.3.40.0150.00019.14
8.3.30.0110.00418.80
8.3.20.0050.00318.61
8.3.10.0080.00021.22
8.3.00.0030.00519.68
8.2.180.0110.00416.75
8.2.170.0100.00622.96
8.2.160.0100.00720.38
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.12
8.2.110.0090.00020.42
8.2.100.0040.00717.78
8.2.90.0000.00819.09
8.2.80.0040.00419.25
8.2.70.0050.00717.38
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0040.00418.09
8.2.30.0030.00319.38
8.2.20.0050.00317.65
8.2.10.0040.00417.67
8.2.00.0030.00517.75
8.1.280.0140.00025.92
8.1.270.0000.00823.99
8.1.260.0070.01126.35
8.1.250.0040.00428.09
8.1.240.0040.00422.54
8.1.230.0110.00020.97
8.1.220.0080.00018.77
8.1.210.0060.00318.85
8.1.200.0030.00617.35
8.1.190.0040.00417.52
8.1.180.0030.00618.10
8.1.170.0040.00418.50
8.1.160.0000.00718.80
8.1.150.0070.00018.66
8.1.140.0040.00417.52
8.1.130.0030.00317.89
8.1.120.0070.00017.39
8.1.110.0080.00017.45
8.1.100.0070.00017.36
8.1.90.0000.00817.43
8.1.80.0040.00417.37
8.1.70.0030.00317.48
8.1.60.0060.00317.52
8.1.50.0030.00617.39
8.1.40.0040.00417.55
8.1.30.0040.00417.67
8.1.20.0040.00417.53
8.1.10.0050.00217.58
8.1.00.0040.00417.52
8.0.300.0040.00419.77
8.0.290.0040.00417.05
8.0.280.0000.00718.38
8.0.270.0030.00317.27
8.0.260.0000.00616.80
8.0.250.0040.00417.08
8.0.240.0080.00016.95
8.0.230.0070.00016.94
8.0.220.0060.00316.93
8.0.210.0050.00316.84
8.0.200.0000.00616.96
8.0.190.0050.00316.94
8.0.180.0000.00717.03
8.0.170.0030.00317.01
8.0.160.0000.01016.95
8.0.150.0000.00716.93
8.0.140.0030.00316.83
8.0.130.0030.00313.40
8.0.120.0080.00016.86
8.0.110.0040.00416.96
8.0.100.0040.00416.96
8.0.90.0040.00416.87
8.0.80.0070.01017.00
8.0.70.0040.00416.82
8.0.60.0000.00716.79
8.0.50.0050.00316.97
8.0.30.0120.00617.04
8.0.20.0130.00617.40
8.0.10.0070.00017.07
8.0.00.0120.00916.77
7.4.330.0000.00616.79
7.4.320.0030.00316.64
7.4.300.0030.00316.61
7.4.290.0000.00716.53
7.4.280.0000.00716.44
7.4.270.0000.00816.52
7.4.260.0050.00013.40
7.4.250.0040.00416.49
7.4.240.0050.00316.41
7.4.230.0070.00016.37
7.4.220.0060.01916.38
7.4.210.0070.00716.54
7.4.200.0070.00016.43
7.4.190.0000.00716.70
7.4.160.0110.00516.34
7.4.150.0140.00417.40
7.4.140.0090.00917.86
7.4.130.0050.01416.55
7.4.120.0140.00516.37
7.4.110.0140.01016.65
7.4.100.0100.00716.71
7.4.90.0100.00716.37
7.4.80.0180.00619.39
7.4.70.0100.00716.64
7.4.60.0100.00716.51
7.4.50.0050.00516.37
7.4.40.0060.00922.77
7.4.30.0040.01116.49
7.4.00.0040.01114.77
7.3.330.0000.00613.45
7.3.320.0000.00513.44
7.3.310.0000.00716.55
7.3.300.0000.00616.40
7.3.290.0030.01016.53
7.3.280.0120.00916.44
7.3.270.0200.00317.40
7.3.260.0070.01418.24
7.3.250.0080.00916.39
7.3.240.0110.00616.46
7.3.230.0110.00716.39
7.3.210.0150.00616.53
7.3.200.0070.01019.39
7.3.190.0100.00716.43
7.3.180.0120.00316.52
7.3.170.0080.00816.46
7.3.160.0030.01316.71
7.3.120.0070.00314.97
7.3.10.0120.00716.28
7.3.00.0130.00916.77
7.2.330.0090.01216.72
7.2.320.0070.01716.81
7.2.310.0130.00616.79
7.2.300.0130.00516.86
7.2.290.0030.01316.82
7.2.130.0110.00716.86
7.2.120.0150.00416.70
7.2.110.0130.00816.65
7.2.100.0100.00716.77
7.2.90.0110.00916.87
7.2.80.0090.00416.72
7.2.70.0110.00416.83
7.2.60.0120.00317.01
7.2.50.0060.00816.82
7.2.40.0110.00816.51
7.2.30.0100.00616.58
7.2.20.0050.01116.81
7.2.10.0080.00516.71
7.2.00.0170.00617.72
7.1.250.0090.00615.76
7.1.200.0040.00715.89
7.1.100.0080.00518.03
7.1.70.0000.00817.33
7.1.60.0040.00817.25
7.1.50.0070.01317.13
7.1.40.0030.00816.54
7.1.30.0000.01416.66
7.1.20.0000.01116.81
7.1.10.0050.00216.48
7.1.00.0070.00516.59
7.0.200.0070.00016.82
7.0.190.0030.00716.76
7.0.180.0040.00416.29
7.0.170.0040.00416.38
7.0.160.0000.00816.22
7.0.150.0040.00416.13
7.0.140.0000.00916.63
7.0.130.0000.00716.68
7.0.120.0030.00616.77
7.0.110.0000.00816.67
7.0.100.0040.00416.34
7.0.90.0040.00416.20
7.0.80.0030.00616.40
7.0.70.0000.01016.39
7.0.60.0000.00716.35
7.0.50.0000.01316.56
7.0.40.0070.00714.79
7.0.30.0000.00714.79
7.0.20.0040.00414.79
7.0.10.0040.00414.79
7.0.00.0030.00814.79
5.6.300.0060.03820.90
5.6.290.0000.04820.84
5.6.280.0030.04720.86
5.6.270.0000.04720.87
5.6.260.0000.04521.10
5.6.250.0070.03821.04
5.6.240.0030.04621.06
5.6.230.0070.04120.93
5.6.220.0070.03721.04
5.6.210.0170.05021.09
5.6.200.0110.04921.07
5.6.190.0070.04421.00
5.6.180.0090.03821.07
5.6.170.0070.03721.03
5.6.160.0030.04721.00
5.6.150.0070.04320.87
5.6.140.0060.03820.96
5.6.130.0100.03321.00
5.6.120.0060.05421.05
5.6.110.0040.04220.93
5.6.100.0000.05020.76
5.6.90.0060.04220.75
5.6.80.0100.03520.34
5.6.70.0030.04120.12
5.6.60.0100.04420.33
5.6.50.0130.04220.42
5.6.40.0070.03420.19
5.6.30.0000.05120.32
5.6.20.0030.04820.10
5.6.10.0130.05120.10
5.6.00.0030.04420.27
5.5.380.0030.04817.63
5.5.370.0030.04217.41
5.5.360.0070.03717.53
5.5.350.0000.04317.53
5.5.340.0030.06418.04
5.5.330.0030.04117.71
5.5.320.0130.04218.09
5.5.310.0060.03617.88
5.5.300.0130.04817.84
5.5.290.0030.04618.18
5.5.280.0030.08118.06
5.5.270.0000.04617.86
5.5.260.0000.05418.17
5.5.250.0030.04217.55
5.5.240.0000.04317.22
5.5.230.0040.03917.51
5.5.220.0030.04317.12
5.5.210.0030.03717.50
5.5.200.0030.05117.50
5.5.190.0000.04517.38
5.5.180.0030.03717.20
5.5.160.0030.04617.09
5.5.150.0070.03817.45
5.5.140.0030.04117.38
5.5.130.0070.03517.21
5.5.120.0030.07217.44
5.5.110.0030.07617.09
5.5.100.0100.04517.13
5.5.90.0090.04416.95
5.5.80.0070.03817.08
5.5.70.0070.06317.33
5.5.60.0030.05617.42
5.5.50.0070.04417.39
5.5.40.0070.06017.34
5.5.30.0040.05717.27
5.5.20.0070.03517.38
5.5.10.0030.03816.98
5.5.00.0030.07417.36
5.4.450.0030.04319.56
5.4.440.0030.04419.40
5.4.430.0030.04619.43
5.4.420.0130.03319.30
5.4.410.0030.04219.09
5.4.400.0030.03919.08
5.4.390.0140.05119.21
5.4.380.0100.03819.25
5.4.370.0000.03819.04
5.4.360.0030.05119.16
5.4.350.0030.03919.13
5.4.340.0070.04019.17
5.4.320.0070.04019.11
5.4.310.0000.04718.98
5.4.300.0100.02918.91
5.4.290.0000.04119.23
5.4.280.0030.08319.05
5.4.270.0030.04019.20
5.4.260.0030.03919.08
5.4.250.0040.03619.07
5.4.240.0040.04418.97
5.4.230.0040.03619.06
5.4.220.0070.04018.95
5.4.210.0060.03619.05
5.4.200.0030.04818.91
5.4.190.0070.06419.15
5.4.180.0030.03719.06
5.4.170.0070.06119.13
5.4.160.0030.07619.18
5.4.150.0030.05118.85
5.4.140.0090.04016.64
5.4.130.0040.03416.70
5.4.120.0000.04616.73
5.4.110.0030.04616.69
5.4.100.0030.03716.55
5.4.90.0100.03916.82
5.4.80.0030.07616.67
5.4.70.0000.05416.52
5.4.60.0030.06716.55
5.4.50.0000.03916.46
5.4.40.0100.03216.63
5.4.30.0060.03416.55
5.4.20.0080.03116.47
5.4.10.0090.03516.56
5.4.00.0100.02716.11
5.3.290.0040.04214.86
5.3.280.0030.06814.79
5.3.270.0070.06214.79
5.3.260.0030.03714.97
5.3.250.0030.03614.80
5.3.240.0040.03714.92
5.3.230.0030.03914.88
5.3.220.0060.03514.79
5.3.210.0060.03814.88
5.3.200.0060.03814.79
5.3.190.0070.03814.89
5.3.180.0000.08114.85
5.3.170.0060.03214.93
5.3.160.0000.04114.85
5.3.150.0030.07114.84
5.3.140.0060.03514.79
5.3.130.0000.04214.86
5.3.120.0030.03714.79
5.3.110.0030.03814.85
5.3.100.0000.05714.79
5.3.90.0030.04014.79
5.3.80.0040.03614.79
5.3.70.0100.02914.79
5.3.60.0000.04214.79
5.3.50.0040.03914.79
5.3.40.0000.05814.79
5.3.30.0030.06814.79
5.3.20.0040.04914.79
5.3.10.0070.03614.79
5.3.00.0000.03814.79
5.2.170.0030.03014.79
5.2.160.0000.04014.79
5.2.150.0000.04114.79
5.2.140.0030.06714.79
5.2.130.0070.03714.79
5.2.120.0100.02614.79
5.2.110.0070.02314.79
5.2.100.0070.03014.79
5.2.90.0070.05714.79
5.2.80.0000.04214.79
5.2.70.0000.03114.79
5.2.60.0030.05714.79
5.2.50.0030.07014.79
5.2.40.0000.04114.79
5.2.30.0030.03914.79
5.2.20.0030.02614.79
5.2.10.0030.02614.79
5.2.00.0030.03614.79
5.1.60.0000.02814.79
5.1.50.0000.03014.79
5.1.40.0000.02614.79
5.1.30.0030.02514.79
5.1.20.0070.02814.79
5.1.10.0060.02214.79
5.1.00.0030.03114.79
5.0.50.0030.02114.79
5.0.40.0000.02114.79
5.0.30.0000.03214.79
5.0.20.0030.03514.79
5.0.10.0030.01914.79
5.0.00.0030.02814.79
4.4.90.0000.02714.79
4.4.80.0030.03214.79
4.4.70.0030.01314.79
4.4.60.0000.03414.79
4.4.50.0040.01914.79
4.4.40.0030.02814.79
4.4.30.0000.01814.79
4.4.20.0030.01314.79
4.4.10.0000.02214.79
4.4.00.0000.03114.79
4.3.110.0000.02014.79
4.3.100.0000.01714.79
4.3.90.0060.01314.79
4.3.80.0000.02914.79
4.3.70.0030.01714.79
4.3.60.0120.00614.79
4.3.50.0000.01714.79
4.3.40.0030.02314.79
4.3.30.0030.01314.79
4.3.20.0000.01714.79
4.3.10.0000.01814.79
4.3.00.0000.01614.79

preferences:
41.94 ms | 401 KiB | 5 Q