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; private $color; private $coordinates; public function __construct($radio, $color = 'purple', $coordinates = array('x' => 0, 'y' => 0)) { $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(5); 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.0150.00018.30
8.3.50.0090.01021.14
8.3.40.0090.01218.85
8.3.30.0150.00318.89
8.3.20.0040.00418.72
8.3.10.0040.00421.04
8.3.00.0070.00719.79
8.2.180.0070.01016.63
8.2.170.0170.00322.96
8.2.160.0080.01220.57
8.2.150.0090.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00721.03
8.2.110.0070.00320.97
8.2.100.0110.00017.84
8.2.90.0030.00519.05
8.2.80.0050.00317.97
8.2.70.0090.00017.63
8.2.60.0090.00017.93
8.2.50.0000.00918.10
8.2.40.0030.00618.22
8.2.30.0000.00721.20
8.2.20.0040.00417.66
8.2.10.0000.00817.75
8.2.00.0000.00717.72
8.1.280.0100.01025.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00019.37
8.1.230.0000.01117.77
8.1.220.0050.00317.75
8.1.210.0030.00618.77
8.1.200.0090.00017.48
8.1.190.0060.00317.35
8.1.180.0040.00418.10
8.1.170.0040.00418.56
8.1.160.0040.00418.89
8.1.150.0080.00018.57
8.1.140.0000.00817.53
8.1.130.0030.00317.86
8.1.120.0030.00317.39
8.1.110.0000.00817.41
8.1.100.0000.00717.38
8.1.90.0000.00817.35
8.1.80.0000.00817.41
8.1.70.0070.00017.43
8.1.60.0040.00417.64
8.1.50.0030.00617.47
8.1.40.0080.00017.50
8.1.30.0030.00617.50
8.1.20.0000.00917.52
8.1.10.0040.00417.60
8.1.00.0040.00417.38
8.0.300.0070.00018.77
8.0.290.0000.00716.71
8.0.280.0000.00718.46
8.0.270.0050.00317.27
8.0.260.0000.00716.84
8.0.250.0030.00617.01
8.0.240.0060.00316.87
8.0.230.0050.00216.93
8.0.220.0030.00616.80
8.0.210.0040.00416.95
8.0.200.0000.00616.97
8.0.190.0000.00717.00
8.0.180.0000.00716.94
8.0.170.0040.00416.95
8.0.160.0040.00716.80
8.0.150.0050.00316.88
8.0.140.0050.00216.88
8.0.130.0000.00613.41
8.0.120.0040.00416.87
8.0.110.0000.00716.82
8.0.100.0050.00216.98
8.0.90.0070.00016.71
8.0.80.0120.00316.84
8.0.70.0040.00416.98
8.0.60.0040.00416.95
8.0.50.0000.00716.95
8.0.30.0090.01017.02
8.0.20.0110.01117.42
8.0.10.0040.00416.86
8.0.00.0090.00916.66
7.4.330.0030.00316.73
7.4.320.0000.00716.60
7.4.300.0000.00616.63
7.4.290.0000.00716.61
7.4.280.0030.00316.59
7.4.270.0030.00316.61
7.4.260.0050.00013.29
7.4.250.0030.00516.54
7.4.240.0000.00716.51
7.4.230.0030.00316.63
7.4.220.0120.00616.66
7.4.210.0060.01116.60
7.4.200.0000.00716.59
7.4.190.0030.00316.76
7.4.160.0070.00916.58
7.4.150.0180.00817.40
7.4.140.0080.01017.86
7.4.130.0070.01116.51
7.4.120.0080.01216.45
7.4.110.0070.01316.67
7.4.100.0040.01316.53
7.4.90.0070.01016.64
7.4.80.0070.01019.39
7.4.70.0030.01316.53
7.4.60.0130.00716.39
7.4.50.0060.00316.61
7.4.40.0060.00922.77
7.4.30.0070.01016.43
7.4.00.0050.00515.03
7.3.330.0050.00013.25
7.3.320.0050.00013.39
7.3.310.0000.00716.29
7.3.300.0000.00716.25
7.3.290.0110.00316.49
7.3.280.0060.01216.40
7.3.270.0120.01217.40
7.3.260.0090.00818.24
7.3.250.0100.00916.35
7.3.240.0060.00916.62
7.3.230.0130.00316.39
7.3.210.0060.01316.45
7.3.200.0070.01119.39
7.3.190.0090.00916.47
7.3.180.0090.00916.42
7.3.170.0090.00616.37
7.3.160.0160.00816.63
7.3.120.0090.00615.10
7.3.10.0090.00616.50
7.3.00.0070.00716.59
7.2.330.0070.01116.70
7.2.320.0120.00616.88
7.2.310.0180.01116.79
7.2.300.0150.00316.56
7.2.290.0060.00916.74
7.2.130.0070.00716.85
7.2.120.0100.01016.89
7.2.110.0080.00416.55
7.2.100.0180.00416.49
7.2.90.0160.00316.37
7.2.80.0120.00316.61
7.2.70.0090.00316.78
7.2.60.0050.01016.76
7.2.50.0070.00316.80
7.2.40.0000.00816.77
7.2.30.0060.00617.00
7.2.20.0070.00716.97
7.2.10.0130.00416.93
7.2.00.0090.00518.16
7.1.250.0090.00915.52
7.1.200.0040.00815.61
7.1.100.0090.00917.82
7.1.70.0100.00017.33
7.1.60.0120.00617.29
7.1.50.0100.00317.04
7.1.40.0100.00316.34
7.1.30.0060.01116.66
7.1.20.0040.01316.58
7.1.10.0040.00416.70
7.1.00.0060.00316.66
7.0.200.0030.00816.91
7.0.190.0030.00716.74
7.0.180.0000.00916.32
7.0.170.0000.01016.05
7.0.160.0090.00616.43
7.0.150.0030.00616.43
7.0.140.0000.00916.25
7.0.130.0040.01116.40
7.0.120.0030.00916.40
7.0.110.0000.01116.36
7.0.100.0000.01216.45
7.0.90.0000.00716.35
7.0.80.0000.01116.63
7.0.70.0000.00816.30
7.0.60.0040.00416.14
7.0.50.0030.01016.49
7.0.40.0050.00515.13
7.0.30.0030.00615.13
7.0.20.0000.00815.13
7.0.10.0040.00415.13
7.0.00.0000.01015.13
5.6.300.0000.04520.70
5.6.290.0130.03220.82
5.6.280.0030.04720.83
5.6.270.0030.04920.90
5.6.260.0000.05720.98
5.6.250.0060.04220.89
5.6.240.0110.03520.86
5.6.230.0070.04920.83
5.6.220.0030.04120.96
5.6.210.0100.03721.12
5.6.200.0000.05320.75
5.6.190.0030.04820.94
5.6.180.0000.05221.02
5.6.170.0000.05420.85
5.6.160.0100.04821.04
5.6.150.0030.05420.84
5.6.140.0030.04021.03
5.6.130.0030.04520.83
5.6.120.0000.04521.06
5.6.110.0000.04620.86
5.6.100.0030.07321.04
5.6.90.0100.04120.98
5.6.80.0070.03920.42
5.6.70.0220.03020.21
5.6.60.0000.04520.14
5.6.50.0170.03620.23
5.6.40.0070.04220.41
5.6.30.0030.04920.42
5.6.20.0070.03620.10
5.6.10.0070.05920.19
5.6.00.0000.08920.13
5.5.380.0030.04817.58
5.5.370.0030.04517.63
5.5.360.0070.03617.53
5.5.350.0000.04217.61
5.5.340.0070.04217.86
5.5.330.0030.03918.07
5.5.320.0000.04618.00
5.5.310.0030.04318.03
5.5.300.0100.03317.74
5.5.290.0130.04118.04
5.5.280.0000.05718.01
5.5.270.0000.04218.03
5.5.260.0000.06717.70
5.5.250.0030.07317.88
5.5.240.0030.03917.48
5.5.230.0030.04017.38
5.5.220.0070.03917.43
5.5.210.0060.04217.44
5.5.200.0030.03817.41
5.5.190.0030.04717.48
5.5.180.0000.05817.50
5.5.160.0040.03617.45
5.5.150.0070.05917.43
5.5.140.0100.03517.48
5.5.130.0030.07117.11
5.5.120.0000.04417.36
5.5.110.0100.05217.43
5.5.100.0070.05817.34
5.5.90.0000.04317.38
5.5.80.0130.06517.29
5.5.70.0030.04316.99
5.5.60.0070.03617.30
5.5.50.0000.04717.10
5.5.40.0060.03617.25
5.5.30.0030.04317.30
5.5.20.0000.04717.37
5.5.10.0030.05917.07
5.5.00.0000.05917.23
5.4.450.0000.04219.53
5.4.440.0030.05019.51
5.4.430.0030.04119.48
5.4.420.0000.04419.29
5.4.410.0130.03619.14
5.4.400.0070.04019.07
5.4.390.0030.04518.92
5.4.380.0070.03319.08
5.4.370.0060.03518.99
5.4.360.0060.03519.11
5.4.350.0070.03318.91
5.4.340.0030.09019.08
5.4.320.0030.08619.23
5.4.310.0040.03618.95
5.4.300.0030.03619.08
5.4.290.0040.04219.16
5.4.280.0030.05219.23
5.4.270.0030.04519.06
5.4.260.0030.04018.91
5.4.250.0000.04218.94
5.4.240.0100.04618.98
5.4.230.0030.03918.94
5.4.220.0000.05318.97
5.4.210.0030.03918.88
5.4.200.0160.03819.14
5.4.190.0030.03719.10
5.4.180.0070.03319.22
5.4.170.0100.03918.88
5.4.160.0100.03319.21
5.4.150.0100.03619.12
5.4.140.0000.04016.83
5.4.130.0070.06016.77
5.4.120.0000.03716.55
5.4.110.0030.04216.83
5.4.100.0070.03116.54
5.4.90.0000.04316.83
5.4.80.0040.03516.61
5.4.70.0090.03416.45
5.4.60.0030.04316.69
5.4.50.0030.03316.43
5.4.40.0000.03716.66
5.4.30.0000.03616.45
5.4.20.0000.04516.65
5.4.10.0030.03516.71
5.4.00.0130.03616.04
5.3.290.0000.05015.13
5.3.280.0070.03615.13
5.3.270.0000.04015.13
5.3.260.0000.04315.13
5.3.250.0030.03515.13
5.3.240.0030.03515.13
5.3.230.0000.05115.13
5.3.220.0030.03515.13
5.3.210.0000.04715.13
5.3.200.0030.03515.13
5.3.190.0000.04815.13
5.3.180.0030.03815.13
5.3.170.0000.04215.13
5.3.160.0000.04015.13
5.3.150.0030.03415.13
5.3.140.0040.03615.13
5.3.130.0130.05215.13
5.3.120.0000.04315.13
5.3.110.0030.03715.13
5.3.100.0030.03615.13
5.3.90.0030.03715.13
5.3.80.0030.06815.13
5.3.70.0030.04415.13
5.3.60.0000.03915.13
5.3.50.0030.03615.13
5.3.40.0170.05115.13
5.3.30.0030.03715.13
5.3.20.0030.03515.13
5.3.10.0100.03015.13
5.3.00.0000.04115.13
5.2.170.0060.02815.13
5.2.160.0000.03415.13
5.2.150.0060.02915.13
5.2.140.0060.02815.13
5.2.130.0000.03015.13
5.2.120.0000.03315.13
5.2.110.0030.02715.13
5.2.100.0030.02915.13
5.2.90.0000.04115.13
5.2.80.0000.03015.13
5.2.70.0030.03715.13
5.2.60.0000.03315.13
5.2.50.0000.03515.13
5.2.40.0070.03015.13
5.2.30.0030.03915.13
5.2.20.0000.03115.13
5.2.10.0000.02915.13
5.2.00.0000.03415.13
5.1.60.0100.02015.13
5.1.50.0090.03815.13
5.1.40.0070.04015.13
5.1.30.0000.03415.13
5.1.20.0030.02615.13
5.1.10.0000.03315.13
5.1.00.0130.04715.13
5.0.50.0000.02515.13
5.0.40.0030.02115.13
5.0.30.0040.02815.13
5.0.20.0000.02315.13
5.0.10.0000.02915.13
5.0.00.0030.02915.13
4.4.90.0030.01915.13
4.4.80.0000.01615.13
4.4.70.0070.01715.13
4.4.60.0070.01315.13
4.4.50.0070.03015.13
4.4.40.0160.02515.13
4.4.30.0100.01015.13
4.4.20.0030.02015.13
4.4.10.0000.01715.13
4.4.00.0030.02615.13
4.3.110.0000.01615.13
4.3.100.0030.01315.13
4.3.90.0000.02215.13
4.3.80.0030.02215.13
4.3.70.0030.01415.13
4.3.60.0000.01715.13
4.3.50.0000.01715.13
4.3.40.0000.02615.13
4.3.30.0070.01315.13
4.3.20.0000.01915.13
4.3.10.0000.02015.13
4.3.00.0000.01815.13

preferences:
52.76 ms | 401 KiB | 5 Q