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 = 'purple') { $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, 'lightblue', array('x' => 4, 'y' => 4)); 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.0040.01118.55
8.3.50.0080.00822.11
8.3.40.0060.00918.95
8.3.30.0170.00018.77
8.3.20.0000.00918.90
8.3.10.0040.00421.21
8.3.00.0060.00319.70
8.2.180.0110.00416.75
8.2.170.0040.01122.96
8.2.160.0090.01220.52
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00321.00
8.2.110.0040.00420.88
8.2.100.0120.00017.72
8.2.90.0050.00319.23
8.2.80.0050.00317.97
8.2.70.0030.00617.38
8.2.60.0000.00817.93
8.2.50.0050.00318.07
8.2.40.0040.00417.91
8.2.30.0000.00721.16
8.2.20.0000.00717.72
8.2.10.0040.00417.75
8.2.00.0000.00817.69
8.1.280.0120.00925.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00920.83
8.1.230.0040.00817.43
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0040.00417.53
8.1.180.0050.00318.10
8.1.170.0040.00418.65
8.1.160.0040.00418.82
8.1.150.0050.00318.72
8.1.140.0040.00417.49
8.1.130.0030.00317.85
8.1.120.0050.00217.48
8.1.110.0030.00517.35
8.1.100.0000.00817.53
8.1.90.0070.00017.53
8.1.80.0050.00217.32
8.1.70.0000.00717.45
8.1.60.0060.00317.64
8.1.50.0000.00717.51
8.1.40.0030.00617.61
8.1.30.0030.00517.61
8.1.20.0080.00017.61
8.1.10.0070.00017.59
8.1.00.0050.00317.53
8.0.300.0000.00718.77
8.0.290.0050.00216.75
8.0.280.0070.00018.44
8.0.270.0050.00217.29
8.0.260.0040.00416.92
8.0.250.0000.00916.99
8.0.240.0040.00416.98
8.0.230.0000.00717.06
8.0.220.0060.00316.98
8.0.210.0070.00016.89
8.0.200.0030.00317.02
8.0.190.0030.00316.89
8.0.180.0000.00817.06
8.0.170.0000.00816.96
8.0.160.0040.00416.95
8.0.150.0040.00416.94
8.0.140.0030.00316.96
8.0.130.0060.00013.37
8.0.120.0000.00816.79
8.0.110.0000.00816.85
8.0.100.0030.00517.02
8.0.90.0040.00417.00
8.0.80.0160.00616.93
8.0.70.0040.00416.83
8.0.60.0000.00716.80
8.0.50.0040.00416.77
8.0.30.0060.01317.32
8.0.20.0110.01117.40
8.0.10.0000.00817.10
8.0.00.0100.00916.68
7.4.330.0050.00016.89
7.4.320.0060.00016.53
7.4.300.0080.00016.67
7.4.290.0040.00416.47
7.4.280.0030.00316.50
7.4.270.0000.00716.47
7.4.260.0000.00613.25
7.4.250.0060.00316.48
7.4.240.0000.00716.62
7.4.230.0070.00016.70
7.4.220.0100.01416.55
7.4.210.0090.00716.57
7.4.200.0040.00416.37
7.4.190.0030.00316.40
7.4.160.0140.00616.46
7.4.150.0150.00917.40
7.4.140.0080.00817.86
7.4.130.0070.01016.60
7.4.120.0060.01116.49
7.4.110.0100.00716.44
7.4.100.0060.01216.71
7.4.90.0180.00016.51
7.4.80.0150.00419.39
7.4.70.0060.01016.58
7.4.60.0100.00716.54
7.4.50.0060.00316.56
7.4.40.0080.00322.77
7.4.30.0090.00916.47
7.4.00.0110.00315.16
7.3.330.0000.00613.46
7.3.320.0000.00513.24
7.3.310.0070.00016.33
7.3.300.0030.00316.46
7.3.290.0110.00716.41
7.3.280.0110.00616.43
7.3.270.0060.01517.40
7.3.260.0030.01418.24
7.3.250.0090.00916.40
7.3.240.0130.00616.33
7.3.230.0100.00716.71
7.3.210.0030.01316.35
7.3.200.0100.00719.39
7.3.190.0150.00616.56
7.3.180.0060.00916.37
7.3.170.0090.01216.41
7.3.160.0130.01016.67
7.3.120.0030.01014.79
7.2.330.0150.00416.52
7.2.320.0160.00616.80
7.2.310.0090.00916.79
7.2.300.0130.00316.56
7.2.290.0180.00416.86
7.2.00.0160.00319.38
7.1.200.0040.01215.88
7.1.100.0070.00718.37
7.1.70.0070.00317.06
7.1.60.0030.00917.29
7.1.50.0030.00716.68
7.1.40.0080.00416.45
7.1.30.0040.00716.55
7.1.20.0070.00716.82
7.1.10.0040.00416.61
7.1.00.0000.00816.81
7.0.200.0030.00716.88
7.0.190.0070.00316.86
7.0.180.0000.01116.16
7.0.170.0000.01016.37
7.0.160.0060.00316.22
7.0.150.0000.01216.20
7.0.140.0040.00416.31
7.0.130.0030.00616.54
7.0.120.0070.01016.69
7.0.110.0000.00816.63
7.0.100.0050.00316.41
7.0.90.0000.00916.26
7.0.80.0060.00316.55
7.0.70.0100.00316.46
7.0.60.0050.00316.25
7.0.50.0030.00716.35
7.0.40.0000.01015.70
7.0.30.0100.00315.70
7.0.20.0060.00315.70
7.0.10.0000.00915.70
7.0.00.0080.00015.70
5.6.300.0030.08420.69
5.6.290.0140.03420.68
5.6.280.0030.04021.06
5.6.270.0070.08221.09
5.6.260.0000.04921.08
5.6.250.0140.05220.82
5.6.240.0100.03621.00
5.6.230.0000.04520.84
5.6.220.0220.03820.87
5.6.210.0070.04120.99
5.6.200.0030.04120.76
5.6.190.0000.07420.90
5.6.180.0030.04021.07
5.6.170.0040.04020.82
5.6.160.0000.04320.95
5.6.150.0100.07720.95
5.6.140.0070.03920.81
5.6.130.0000.04420.93
5.6.120.0070.05220.82
5.6.110.0030.04120.91
5.6.100.0100.03820.93
5.6.90.0000.04520.75
5.6.80.0030.04120.44
5.6.70.0030.04620.29
5.6.60.0070.04320.25
5.6.50.0030.04220.07
5.6.40.0100.04320.19
5.6.30.0100.05020.32
5.6.20.0090.03920.10
5.6.10.0030.04420.17
5.6.00.0100.03820.15
5.5.380.0070.03617.51
5.5.370.0030.04417.47
5.5.360.0000.04217.63
5.5.350.0000.04117.55
5.5.340.0000.04418.07
5.5.330.0000.04217.73
5.5.320.0030.04018.00
5.5.310.0100.03317.83
5.5.300.0030.04218.00
5.5.290.0030.04318.00
5.5.280.0000.07618.02
5.5.270.0000.04318.01
5.5.260.0000.04418.07
5.5.250.0140.03817.76
5.5.240.0030.03817.47
5.5.230.0000.04517.11
5.5.220.0260.03317.47
5.5.210.0030.04117.46
5.5.200.0030.04017.45
5.5.190.0070.03617.09
5.5.180.0070.03817.34
5.5.160.0030.04117.39
5.5.150.0000.04317.39
5.5.140.0030.04617.43
5.5.130.0030.04117.42
5.5.120.0030.04617.04
5.5.110.0100.03317.34
5.5.100.0130.03217.34
5.5.90.0040.04117.40
5.5.80.0030.04317.08
5.5.70.0040.04217.34
5.5.60.0030.03717.31
5.5.50.0060.03517.34
5.5.40.0070.03417.32
5.5.30.0040.03917.09
5.5.20.0100.03317.33
5.5.10.0060.04317.11
5.5.00.0090.03217.32
5.4.450.0030.04019.38
5.4.440.0000.05419.39
5.4.430.0040.03919.37
5.4.420.0030.04319.47
5.4.410.0070.04319.27
5.4.400.0000.04419.16
5.4.390.0000.04618.91
5.4.380.0060.04118.96
5.4.370.0000.04619.17
5.4.360.0000.04518.90
5.4.350.0030.04818.88
5.4.340.0100.03618.96
5.4.320.0130.03519.20
5.4.310.0070.04519.02
5.4.300.0030.04019.18
5.4.290.0000.03919.02
5.4.280.0330.03319.05
5.4.270.0030.03519.14
5.4.260.0000.04319.05
5.4.250.0100.04819.21
5.4.240.0030.03919.21
5.4.230.0030.04319.11
5.4.220.0030.03718.86
5.4.210.0100.03619.05
5.4.200.0060.03818.96
5.4.190.0090.03119.04
5.4.180.0030.03919.04
5.4.170.0000.04218.89
5.4.160.0040.04118.95
5.4.150.0070.04118.95
5.4.140.0030.04116.59
5.4.130.0090.03716.78
5.4.120.0070.04916.80
5.4.110.0030.04416.84
5.4.100.0030.04316.46
5.4.90.0070.03016.75
5.4.80.0070.03316.80
5.4.70.0030.04716.77
5.4.60.0030.03716.67
5.4.50.0000.06516.68
5.4.40.0000.07716.80
5.4.30.0000.07516.66
5.4.20.0000.03816.44
5.4.10.0060.03216.61
5.4.00.0000.08215.90
5.3.290.0000.04615.70
5.3.280.0100.03015.70
5.3.270.0060.04215.70
5.3.260.0030.03715.70
5.3.250.0000.04315.70
5.3.240.0000.03815.70
5.3.230.0040.03515.70
5.3.220.0000.05015.70
5.3.210.0030.03915.70
5.3.200.0030.03615.70
5.3.190.0090.04415.70
5.3.180.0040.03915.70
5.3.170.0070.03415.70
5.3.160.0000.03915.70
5.3.150.0160.03615.70
5.3.140.0070.07215.70
5.3.130.0000.05115.70
5.3.120.0030.04115.70
5.3.110.0030.03715.70
5.3.100.0000.03815.70
5.3.90.0000.03815.70
5.3.80.0030.05815.70
5.3.70.0030.03815.70
5.3.60.0070.07015.70
5.3.50.0030.04715.70
5.3.40.0100.05515.70
5.3.30.0060.03215.70
5.3.20.0000.03815.70
5.3.10.0030.03315.70
5.3.00.0070.03115.70
5.2.170.0040.04915.70
5.2.160.0040.02915.70
5.2.150.0030.03115.70
5.2.140.0000.03415.70
5.2.130.0000.03215.70
5.2.120.0000.03515.70
5.2.110.0070.02315.70
5.2.100.0000.03415.70
5.2.90.0070.05015.70
5.2.80.0030.02715.70
5.2.70.0070.05515.70
5.2.60.0060.03515.70
5.2.50.0030.05515.70
5.2.40.0040.03215.70
5.2.30.0030.02815.70
5.2.20.0130.02315.70
5.2.10.0030.03015.70
5.2.00.0060.03215.70
5.1.60.0070.02015.70
5.1.50.0100.02015.70
5.1.40.0030.02215.70
5.1.30.0000.02715.70
5.1.20.0060.02215.70
5.1.10.0070.02515.70
5.1.00.0000.02815.70
5.0.50.0030.02015.70
5.0.40.0000.02915.70
5.0.30.0030.03415.70
5.0.20.0040.02515.70
5.0.10.0000.02115.70
5.0.00.0000.03315.70
4.4.90.0000.03115.70
4.4.80.0000.03015.70
4.4.70.0000.01715.70
4.4.60.0000.03315.70
4.4.50.0000.01715.70
4.4.40.0030.02715.70
4.4.30.0030.01515.70
4.4.20.0000.02315.70
4.4.10.0030.01415.70
4.4.00.0000.02615.70
4.3.110.0000.01715.70
4.3.100.0000.01715.70
4.3.90.0000.01715.70
4.3.80.0000.02515.70
4.3.70.0000.01915.70
4.3.60.0000.01615.70
4.3.50.0000.01815.70
4.3.40.0030.02215.70
4.3.30.0030.01415.70
4.3.20.0030.01415.70
4.3.10.0000.01715.70
4.3.00.0070.01615.70

preferences:
49.83 ms | 400 KiB | 5 Q