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 dasdsa 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, 'blue'); echo sprintf('El área del circulo color %s y con radio de longitud %s es: %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.0110.00418.30
8.3.50.0070.00922.11
8.3.40.0090.00618.96
8.3.30.0090.00618.97
8.3.20.0080.00018.75
8.3.10.0040.00421.27
8.3.00.0040.00419.68
8.2.180.0160.00718.41
8.2.170.0110.00422.96
8.2.160.0130.00720.39
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0050.00326.16
8.2.120.0080.00021.18
8.2.110.0070.00320.35
8.2.100.0040.00817.91
8.2.90.0040.00419.17
8.2.80.0050.00319.32
8.2.70.0090.00317.63
8.2.60.0000.00817.80
8.2.50.0060.00318.07
8.2.40.0080.00018.16
8.2.30.0030.00521.23
8.2.20.0040.00417.63
8.2.10.0000.00817.66
8.2.00.0030.00617.67
8.1.280.0070.01425.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00422.53
8.1.230.0040.00720.97
8.1.220.0040.00418.77
8.1.210.0030.00718.90
8.1.200.0030.00617.48
8.1.190.0000.00817.53
8.1.180.0000.00818.10
8.1.170.0080.00018.64
8.1.160.0070.00019.01
8.1.150.0040.00418.71
8.1.140.0040.00417.38
8.1.130.0070.00017.71
8.1.120.0070.00017.38
8.1.110.0050.00217.47
8.1.100.0000.00817.47
8.1.90.0000.00717.46
8.1.80.0000.00817.43
8.1.70.0050.00217.41
8.1.60.0050.00317.48
8.1.50.0000.00717.48
8.1.40.0000.00817.58
8.1.30.0040.00417.64
8.1.20.0040.00417.60
8.1.10.0060.00317.49
8.1.00.0040.00417.52
8.0.300.0000.00719.88
8.0.290.0000.00717.05
8.0.280.0000.00718.46
8.0.270.0000.00717.16
8.0.260.0000.00716.78
8.0.250.0040.00417.09
8.0.240.0080.00017.03
8.0.230.0030.00316.92
8.0.220.0040.00416.94
8.0.210.0030.00316.86
8.0.200.0060.00016.95
8.0.190.0040.00417.06
8.0.180.0040.00416.93
8.0.170.0030.00616.96
8.0.160.0060.00317.02
8.0.150.0000.00716.82
8.0.140.0000.00716.88
8.0.130.0050.00013.38
8.0.120.0060.00316.98
8.0.110.0040.00416.95
8.0.100.0000.00716.83
8.0.90.0030.00516.91
8.0.80.0090.00617.02
8.0.70.0040.00417.04
8.0.60.0030.00517.01
8.0.50.0000.00716.82
8.0.30.0080.01017.23
8.0.20.0060.01317.40
8.0.10.0040.00417.10
8.0.00.0070.01116.78
7.4.330.0000.00516.66
7.4.320.0000.00616.54
7.4.300.0060.00016.62
7.4.290.0030.00316.42
7.4.280.0070.00016.52
7.4.270.0000.00716.49
7.4.260.0050.00013.28
7.4.250.0000.00816.59
7.4.240.0040.00416.56
7.4.230.0030.00316.46
7.4.220.0070.01116.50
7.4.210.0060.00916.60
7.4.200.0000.00716.35
7.4.190.0000.00716.57
7.4.160.0040.01216.68
7.4.150.0030.01617.40
7.4.140.0060.01217.86
7.4.130.0050.02716.69
7.4.120.0150.00516.59
7.4.110.0030.01616.42
7.4.100.0140.00316.75
7.4.90.0120.00616.66
7.4.80.0080.00819.39
7.4.70.0100.00716.51
7.4.60.0110.00516.37
7.4.50.0030.00516.65
7.4.40.0130.00322.77
7.4.30.0090.00816.70
7.4.10.0070.01314.86
7.4.00.0080.00814.92
7.3.330.0030.00313.43
7.3.320.0000.00513.45
7.3.310.0030.00316.48
7.3.300.0030.00316.55
7.3.290.0030.01016.41
7.3.280.0080.00916.43
7.3.270.0060.01917.40
7.3.260.0100.01218.24
7.3.250.0080.01016.55
7.3.240.0140.00316.51
7.3.230.0090.01216.51
7.3.210.0070.01416.43
7.3.200.0120.00619.39
7.3.190.0120.00616.56
7.3.180.0110.00516.45
7.3.170.0070.01016.57
7.3.160.0080.00816.63
7.3.130.0060.01315.14
7.3.120.0020.01415.06
7.3.110.0080.01214.93
7.3.100.0040.00714.55
7.3.90.0090.00614.72
7.3.80.0040.00714.84
7.3.70.0040.00414.84
7.3.60.0060.00914.96
7.3.50.0060.00914.92
7.3.40.0060.00614.61
7.3.30.0070.01114.92
7.3.20.0060.00916.90
7.3.10.0070.00716.79
7.3.00.0060.00316.84
7.2.330.0070.01116.48
7.2.320.0130.01316.84
7.2.310.0150.00416.58
7.2.300.0090.00916.74
7.2.290.0110.00516.82
7.2.260.0040.01815.32
7.2.250.0080.01115.14
7.2.240.0120.00414.93
7.2.230.0030.01315.02
7.2.220.0090.00915.03
7.2.210.0060.01015.12
7.2.200.0070.01015.01
7.2.190.0000.01514.95
7.2.180.0030.00914.81
7.2.170.0070.01015.15
7.2.160.0110.00615.16
7.2.150.0080.00817.05
7.2.140.0100.00716.82
7.2.130.0080.00416.98
7.2.120.0060.00316.99
7.2.110.0030.00717.02
7.2.100.0030.01016.89
7.2.90.0090.00916.87
7.2.80.0120.00616.91
7.2.70.0060.00316.99
7.2.60.0110.00016.79
7.2.50.0030.01017.12
7.2.40.0100.00316.79
7.2.30.0000.01017.10
7.2.20.0100.00016.85
7.2.10.0090.00616.96
7.2.00.0030.01218.31
7.1.330.0100.00315.93
7.1.320.0090.00615.95
7.1.310.0060.00916.00
7.1.300.0030.00915.89
7.1.290.0070.00315.63
7.1.280.0060.01315.95
7.1.270.0030.01415.59
7.1.260.0060.00615.54
7.1.250.0070.00715.97
7.1.240.0060.00315.71
7.1.230.0040.00815.77
7.1.220.0100.00615.78
7.1.210.0070.00715.68
7.1.200.0030.00915.68
7.1.190.0070.00315.93
7.1.180.0000.00915.84
7.1.170.0030.00515.78
7.1.160.0060.00515.86
7.1.150.0060.00615.84
7.1.140.0030.01015.94
7.1.130.0060.00615.86
7.1.120.0070.01015.63
7.1.110.0060.01015.69
7.1.100.0080.00617.10
7.1.90.0030.01015.82
7.1.80.0040.01115.94
7.1.70.0040.00716.42
7.1.60.0050.01016.43
7.1.50.0040.00816.12
7.1.40.0030.00915.83
7.1.30.0100.00315.98
7.1.20.0070.00715.44
7.1.10.0080.00415.86
7.1.00.0030.02019.01
7.0.330.0000.00915.55
7.0.320.0030.00515.55
7.0.310.0060.00915.48
7.0.300.0040.00715.55
7.0.290.0060.00615.30
7.0.280.0030.00715.42
7.0.270.0060.01015.65
7.0.260.0040.01115.35
7.0.250.0050.00515.49
7.0.240.0000.00915.46
7.0.230.0090.00615.58
7.0.220.0000.01515.65
7.0.210.0000.01515.59
7.0.200.0090.00516.17
7.0.190.0030.00915.11
7.0.180.0000.01515.45
7.0.170.0080.00815.60
7.0.160.0070.01015.29
7.0.150.0040.01115.54
7.0.140.0100.03518.75
7.0.130.0110.00415.07
7.0.120.0040.01215.50
7.0.110.0090.00615.51
7.0.100.0050.04917.69
7.0.90.0130.04017.62
7.0.80.0080.04317.63
7.0.70.0080.04317.61
7.0.60.0080.04817.78
7.0.50.0030.04317.87
7.0.40.0080.04516.81
7.0.30.0050.04616.80
7.0.20.0070.04716.80
7.0.10.0080.03016.86
7.0.00.0020.04616.65
5.6.400.0040.00414.07
5.6.390.0090.00614.05
5.6.380.0030.00614.28
5.6.370.0040.01214.35
5.6.360.0120.00014.48
5.6.350.0030.01014.18
5.6.340.0090.00314.36
5.6.330.0060.01214.16
5.6.320.0090.00614.32
5.6.310.0030.00914.39
5.6.300.0000.01414.18
5.6.290.0070.00314.71
5.6.280.0030.04117.78
5.6.270.0030.00914.79
5.6.260.0110.00414.52
5.6.250.0050.04317.42
5.6.240.0130.04217.47
5.6.230.0100.03717.62
5.6.220.0090.04517.66
5.6.210.0050.04517.47
5.6.200.0070.04817.80
5.6.190.0060.04017.75
5.6.180.0030.05317.90
5.6.170.0080.02817.74
5.6.160.0050.03217.59
5.6.150.0120.03917.62
5.6.140.0050.04617.80
5.6.130.0030.04817.83
5.6.120.0070.04417.76
5.6.110.0050.04617.69
5.6.100.0090.04217.69
5.6.90.0050.04517.70
5.6.80.0100.04017.35
5.6.70.0020.04717.48
5.6.60.0110.03217.33
5.6.50.0050.04217.24
5.6.40.0050.04417.30
5.6.30.0070.04217.41
5.6.20.0070.04317.46
5.6.10.0070.04017.51
5.6.00.0050.02817.42
5.5.380.0100.03717.49
5.5.370.0090.04117.45
5.5.360.0120.04217.32
5.5.350.0080.03217.34
5.5.340.0100.03917.51
5.5.330.0090.04517.55
5.5.320.0140.04317.62
5.5.310.0080.04417.58
5.5.300.0070.04217.52
5.5.290.0130.04217.86
5.5.280.0060.04317.63
5.5.270.0130.04217.66
5.5.260.0000.04617.63
5.5.250.0070.04317.49
5.5.240.0060.03417.27
5.5.230.0070.04517.31
5.5.220.0050.04017.34
5.5.210.0070.03817.15
5.5.200.0050.04717.18
5.5.190.0120.02317.32
5.5.180.0080.04217.26
5.5.170.0070.01014.34
5.5.160.0060.03917.22
5.5.150.0050.03217.13
5.5.140.0070.04217.23
5.5.130.0060.04317.19
5.5.120.0050.04217.36
5.5.110.0020.04917.11
5.5.100.0100.04117.22
5.5.90.0020.04417.24
5.5.80.0110.03817.03
5.5.70.0040.04417.06
5.5.60.0070.03517.10
5.5.50.0070.04017.25
5.5.40.0070.04017.14
5.5.30.0080.04217.21
5.5.20.0060.04217.10
5.5.10.0080.03817.26
5.5.00.0060.03516.89
5.4.450.0050.04215.96
5.4.440.0040.03015.86
5.4.430.0050.04515.93
5.4.420.0100.02215.92
5.4.410.0070.03915.85
5.4.400.0050.04015.75
5.4.390.0080.02415.70
5.4.380.0120.03515.65
5.4.370.0050.03715.61
5.4.360.0030.04415.70
5.4.350.0030.03715.75
5.4.340.0020.04015.76
5.4.330.0030.00912.36
5.4.320.0050.04315.76
5.4.310.0070.04215.77
5.4.300.0070.04215.61
5.4.290.0020.04915.78
5.4.280.0050.04315.65
5.4.270.0050.04315.61
5.4.260.0030.04115.79
5.4.250.0050.04515.76
5.4.240.0030.03715.76
5.4.230.0050.03815.62
5.4.220.0030.02115.74
5.4.210.0050.04215.70
5.4.200.0070.04215.78
5.4.190.0060.03815.75
5.4.180.0030.03815.76
5.4.170.0070.03815.62
5.4.160.0030.03815.76
5.4.150.0080.04215.72
5.4.140.0030.04114.38
5.4.130.0030.03514.37
5.4.120.0050.03814.43
5.4.110.0020.03814.43
5.4.100.0070.03314.35
5.4.90.0030.02614.44
5.4.80.0070.02514.46
5.4.70.0020.04114.45
5.4.60.0050.03514.34
5.4.50.0060.03514.38
5.4.40.0050.03514.39
5.4.30.0050.04114.43
5.4.20.0070.03714.40
5.4.10.0050.02314.30
5.4.00.0030.03714.11
5.3.290.0070.03813.55
5.3.280.0050.03313.48
5.3.270.0070.04013.55
5.3.260.0100.01713.49
5.3.250.0070.02413.50
5.3.240.0080.04013.46
5.3.230.0050.03813.47
5.3.220.0030.04313.49
5.3.210.0090.03313.44
5.3.200.0090.03813.46
5.3.190.0070.03013.50
5.3.180.0000.04513.44
5.3.170.0060.04013.43
5.3.160.0080.03713.46
5.3.150.0060.04313.49
5.3.140.0030.02513.43
5.3.130.0120.03313.43
5.3.120.0080.03213.51
5.3.110.0050.04013.44
5.3.100.0120.03313.19
5.3.90.0050.03813.22
5.3.80.0070.03713.24
5.3.70.0120.03113.20
5.3.60.0070.02513.20
5.3.50.0070.03913.12
5.3.40.0050.02513.12
5.3.30.0110.03513.10
5.3.20.0070.03812.97
5.3.10.0100.03313.06
5.3.00.0060.01712.96
5.2.170.0070.05311.27
5.2.160.0030.04011.04
5.2.150.0070.06311.16
5.2.140.0070.06311.25
5.2.130.0070.06311.23
5.2.120.0030.06311.13
5.2.110.0030.03011.16
5.2.100.0030.06311.13
5.2.90.0100.05711.12
5.2.80.0070.03311.12
5.2.70.0070.05711.19
5.2.60.0030.06311.14
5.2.50.0070.05710.96
5.2.40.0000.06710.91
5.2.30.0170.05311.09
5.2.20.0030.06311.10
5.2.10.0000.06310.97
5.2.00.0070.06010.81
5.1.60.0000.0309.99
5.1.50.0030.0539.88
5.1.40.0030.0339.98
5.1.30.0000.05010.33
5.1.20.0030.06010.47
5.1.10.0070.05010.16
5.1.00.0030.05710.17
5.0.50.0070.0378.43
5.0.40.0100.0408.42
5.0.30.0070.0578.42
5.0.20.0000.0438.42
5.0.10.0030.0438.42
5.0.00.0100.0608.42
4.4.90.0070.0308.42
4.4.80.0000.0378.42
4.4.70.0030.0378.42
4.4.60.0000.0378.42
4.4.50.0130.0238.42
4.4.40.0030.0538.42
4.4.30.0030.0338.42
4.4.20.0030.0378.42
4.4.10.0030.0338.42
4.4.00.0000.0538.42
4.3.110.0000.0278.42
4.3.100.0070.0308.42
4.3.90.0000.0378.42
4.3.80.0030.0538.42
4.3.70.0070.0278.42
4.3.60.0030.0338.42
4.3.50.0000.0338.42
4.3.40.0030.0478.42
4.3.30.0000.0338.42
4.3.20.0030.0338.42
4.3.10.0000.0338.42
4.3.00.0070.0278.42

preferences:
46.45 ms | 401 KiB | 5 Q