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, 'green'); 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.0170.00318.31
8.3.50.0100.00821.92
8.3.40.0150.00318.92
8.3.30.0110.00418.83
8.3.20.0080.00018.94
8.3.10.0080.00021.22
8.3.00.0060.00319.79
8.2.180.0060.01616.50
8.2.170.0120.00922.96
8.2.160.0070.00720.39
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0050.00326.16
8.2.120.0070.00321.18
8.2.110.0090.00020.55
8.2.100.0040.00817.72
8.2.90.0030.00519.22
8.2.80.0000.00819.32
8.2.70.0040.00817.50
8.2.60.0060.00317.93
8.2.50.0000.00918.07
8.2.40.0000.00818.16
8.2.30.0070.00021.08
8.2.20.0080.00017.60
8.2.10.0030.00617.77
8.2.00.0060.00517.77
8.1.280.0090.00925.92
8.1.270.0000.00823.99
8.1.260.0130.00626.35
8.1.250.0040.00428.09
8.1.240.0060.00322.16
8.1.230.0080.00422.66
8.1.220.0000.00918.77
8.1.210.0000.00818.92
8.1.200.0030.00617.47
8.1.190.0000.00717.63
8.1.180.0060.00318.10
8.1.170.0000.00818.41
8.1.160.0070.00018.90
8.1.150.0070.00018.62
8.1.140.0040.00417.49
8.1.130.0000.00817.86
8.1.120.0070.00017.38
8.1.110.0040.00417.51
8.1.100.0040.00417.45
8.1.90.0070.00017.44
8.1.80.0040.00317.47
8.1.70.0000.00717.43
8.1.60.0100.00017.54
8.1.50.0040.00417.38
8.1.40.0060.00317.44
8.1.30.0040.00417.66
8.1.20.0000.00817.50
8.1.10.0060.00317.51
8.1.00.0050.00317.52
8.0.300.0040.00719.98
8.0.290.0000.00717.18
8.0.280.0030.00318.33
8.0.270.0030.00317.32
8.0.260.0000.00716.77
8.0.250.0000.00817.05
8.0.240.0000.00817.04
8.0.230.0000.00717.02
8.0.220.0060.00316.85
8.0.210.0060.00316.90
8.0.200.0000.00617.03
8.0.190.0000.00716.90
8.0.180.0040.00417.03
8.0.170.0040.00416.95
8.0.160.0100.00017.02
8.0.150.0000.00716.84
8.0.140.0080.00016.83
8.0.130.0000.00513.39
8.0.120.0000.00916.95
8.0.110.0050.00216.91
8.0.100.0000.00817.03
8.0.90.0030.00516.80
8.0.80.0000.01516.85
8.0.70.0040.00416.99
8.0.60.0050.00316.92
8.0.50.0040.00416.95
8.0.30.0120.01017.16
8.0.20.0110.01117.40
8.0.10.0030.00516.97
8.0.00.0080.01316.93
7.4.330.0020.00216.78
7.4.320.0030.00316.66
7.4.300.0020.00516.57
7.4.290.0000.01016.41
7.4.280.0070.00016.37
7.4.270.0040.00416.54
7.4.260.0030.00313.25
7.4.250.0040.00416.46
7.4.240.0040.00416.49
7.4.230.0030.00316.41
7.4.220.0110.00816.50
7.4.210.0110.00516.58
7.4.200.0000.00716.71
7.4.190.0040.00416.74
7.4.160.0080.00816.68
7.4.150.0100.00717.40
7.4.140.0080.00917.86
7.4.130.0070.01316.59
7.4.120.0100.00816.44
7.4.110.0160.00316.68
7.4.100.0040.01316.60
7.4.90.0200.00416.56
7.4.80.0070.01119.39
7.4.70.0130.00316.59
7.4.60.0130.00316.58
7.4.50.0050.00316.20
7.4.40.0060.01222.77
7.4.30.0150.00616.71
7.4.00.0130.00314.89
7.3.330.0000.00613.44
7.3.320.0060.00013.30
7.3.310.0030.00316.39
7.3.300.0070.00016.39
7.3.290.0000.01316.43
7.3.280.0100.00716.49
7.3.270.0070.01117.40
7.3.260.0080.01218.24
7.3.250.0060.01116.46
7.3.240.0140.00916.69
7.3.230.0100.00616.45
7.3.210.0110.01116.39
7.3.200.0130.00619.39
7.3.190.0080.00916.55
7.3.180.0070.00716.46
7.3.170.0070.01016.41
7.3.160.0120.00616.69
7.3.120.0040.01114.95
7.3.10.0020.00916.48
7.3.00.0080.00416.66
7.2.330.0060.01316.59
7.2.320.0120.01116.86
7.2.310.0130.01016.69
7.2.300.0060.01616.80
7.2.290.0080.00816.54
7.2.130.0030.01116.95
7.2.120.0120.00616.85
7.2.110.0060.00916.84
7.2.100.0050.00716.88
7.2.90.0100.00616.99
7.2.80.0070.00516.99
7.2.70.0070.00716.71
7.2.60.0030.00716.86
7.2.50.0080.00716.82
7.2.40.0020.01116.88
7.2.30.0070.00516.83
7.2.20.0070.00516.85
7.2.10.0110.00616.75
7.2.00.0010.01117.85
7.1.250.0080.00915.75
7.1.100.0080.00318.04
7.1.70.0000.01317.09
7.1.60.0210.01315.33
7.1.50.0070.00316.94
7.1.00.0000.03722.36
7.0.200.0030.01216.60
7.0.140.0130.06322.00
7.0.100.0100.04320.00
7.0.90.0000.09320.15
7.0.80.0100.05019.94
7.0.70.0000.09319.90
7.0.60.0170.07020.00
7.0.50.0000.06020.24
7.0.40.0100.04320.08
7.0.30.0230.06720.09
7.0.20.0200.04020.14
7.0.10.0070.05020.01
7.0.00.0100.05720.12
5.6.280.0030.07320.83
5.6.250.0100.07720.79
5.6.240.0070.05020.65
5.6.230.0130.08020.76
5.6.220.0030.08320.63
5.6.210.0170.07320.68
5.6.200.0030.08020.97
5.6.190.0030.05721.15
5.6.180.0030.04720.96
5.6.170.0030.08721.09
5.6.160.0170.04021.02
5.6.150.0070.04321.05
5.6.140.0070.04020.96
5.6.130.0000.04321.17
5.6.120.0100.03721.18
5.6.110.0070.04720.95
5.6.100.0070.03721.00
5.6.90.0070.04020.99
5.6.80.0070.03720.43
5.6.70.0030.04020.38
5.6.60.0030.04020.54
5.6.50.0070.04020.42
5.6.40.0130.02720.45
5.6.30.0070.05020.38
5.6.20.0070.03720.41
5.6.10.0030.04020.35
5.6.00.0030.04320.36
5.5.380.0100.04020.36
5.5.370.0130.06720.36
5.5.360.0130.04020.34
5.5.350.0100.08320.43
5.5.340.0070.06320.81
5.5.330.0130.03320.75
5.5.320.0130.07720.89
5.5.310.0170.06720.91
5.5.300.0030.04720.66
5.5.290.0200.03320.75
5.5.280.0000.06720.77
5.5.270.0000.04720.89
5.5.260.0130.03720.87
5.5.250.0030.04320.44
5.5.240.0000.04020.27
5.5.230.0100.04020.02
5.5.220.0070.03320.22
5.5.210.0030.04320.27
5.5.200.0030.04020.07
5.5.190.0100.04320.25
5.5.180.0030.04320.22
5.5.160.0000.04320.14
5.5.150.0100.03320.25
5.5.140.0100.03020.27
5.5.130.0070.03720.08
5.5.120.0070.03720.13
5.5.110.0100.03720.23
5.5.100.0030.04020.03
5.5.90.0070.03720.18
5.5.80.0070.03720.05
5.5.70.0000.04020.08
5.5.60.0030.04020.07
5.5.50.0030.04320.07
5.5.40.0130.02720.07
5.5.30.0100.03320.05
5.5.20.0070.03720.07
5.5.10.0070.03720.12
5.5.00.0030.04320.11
5.4.450.0000.07719.38
5.4.440.0000.04319.23
5.4.430.0100.03319.53
5.4.420.0070.03719.50
5.4.410.0000.04719.07
5.4.400.0000.03319.04
5.4.390.0030.03719.10
5.4.380.0100.03318.94
5.4.370.0030.04019.04
5.4.360.0030.04019.05
5.4.350.0030.07019.21
5.4.340.0100.05019.12
5.4.320.0030.03719.12
5.4.310.0130.03719.13
5.4.300.0130.03019.22
5.4.290.0030.03718.88
5.4.280.0030.03718.85
5.4.270.0130.03018.84
5.4.260.0100.03019.13
5.4.250.0030.04019.11
5.4.240.0000.04018.92
5.4.230.0000.03718.94
5.4.220.0070.03319.08
5.4.210.0000.04019.20
5.4.200.0070.03319.02
5.4.190.0030.04019.01
5.4.180.0100.02718.89
5.4.170.0070.04019.03
5.4.160.0030.03719.14
5.4.150.0100.03019.05
5.4.140.0000.03716.46
5.4.130.0070.04016.30
5.4.120.0100.05716.50
5.4.110.0030.03716.41
5.4.100.0200.05716.50
5.4.90.0030.03716.40
5.4.80.0130.04316.39
5.4.70.0070.06716.32
5.4.60.0030.06316.37
5.4.50.0030.03316.48
5.4.40.0100.07716.53
5.4.30.0100.07316.46
5.4.20.0070.05316.26
5.4.10.0030.03316.43
5.4.00.0000.03715.77
5.3.290.0000.06314.66
5.3.280.0000.04014.66
5.3.270.0000.04014.63
5.3.260.0070.03014.67
5.3.250.0030.03714.61
5.3.240.0030.03714.57
5.3.230.0070.03714.64
5.3.220.0000.04014.67
5.3.210.0000.04014.70
5.3.200.0070.06014.63
5.3.190.0100.07314.68
5.3.180.0030.07714.64
5.3.170.0070.06014.61
5.3.160.0100.05714.69
5.3.150.0030.04714.60
5.3.140.0000.05014.63
5.3.130.0100.07314.48
5.3.120.0070.07714.62
5.3.110.0100.07014.64
5.3.100.0030.07014.11
5.3.90.0000.05314.06
5.3.80.0070.07014.16
5.3.70.0030.07314.18
5.3.60.0000.06714.02
5.3.50.0100.05314.05
5.3.40.0100.07313.88
5.3.30.0000.04313.98
5.3.20.0030.08013.60
5.3.10.0070.06313.67
5.3.00.0100.07013.65
5.2.170.0030.04712.26
5.2.160.0070.06012.26
5.2.150.0030.05012.26
5.2.140.0000.06712.26
5.2.130.0100.05312.26
5.2.120.0000.04012.26
5.2.110.0030.06012.26
5.2.100.0130.05312.26
5.2.90.0030.04712.26
5.2.80.0030.03312.26
5.2.70.0170.05712.26
5.2.60.0070.04312.26
5.2.50.0100.04312.26
5.2.40.0030.03012.26
5.2.30.0100.05012.26
5.2.20.0030.06012.26
5.2.10.0130.03712.26
5.2.00.0030.06012.26
5.1.60.0070.04312.26
5.1.50.0030.02712.26
5.1.40.0030.03012.26
5.1.30.0000.03012.26
5.1.20.0030.05712.26
5.1.10.0000.05712.26
5.1.00.0000.06012.26
5.0.50.0030.04712.26
5.0.40.0100.03312.26
5.0.30.0030.06312.26
5.0.20.0030.04012.26
5.0.10.0000.04312.26
5.0.00.0030.03712.26
4.4.90.0000.03712.26
4.4.80.0000.02312.26
4.4.70.0030.01712.26
4.4.60.0030.03012.26
4.4.50.0000.02012.26
4.4.40.0000.03012.26
4.4.30.0000.02012.26
4.4.20.0030.02312.26
4.4.10.0000.02312.26
4.4.00.0030.05312.26
4.3.110.0070.02012.26
4.3.100.0000.03312.26
4.3.90.0030.03312.26
4.3.80.0000.04312.26
4.3.70.0030.02712.26
4.3.60.0030.03312.26
4.3.50.0030.03312.26
4.3.40.0000.03012.26
4.3.30.0000.03712.26
4.3.20.0070.03312.26
4.3.10.0030.03712.26
4.3.00.0000.03312.26

preferences:
58.19 ms | 401 KiB | 5 Q