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, 'blue'); 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.55
8.3.50.0100.00921.99
8.3.40.0040.01118.96
8.3.30.0130.00318.79
8.3.20.0040.00418.73
8.3.10.0040.00421.09
8.3.00.0040.00419.70
8.2.180.0070.00716.75
8.2.170.0160.00322.96
8.2.160.0140.00320.38
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0130.00319.95
8.2.110.0080.00319.52
8.2.100.0040.00817.78
8.2.90.0030.00617.84
8.2.80.0080.00017.97
8.2.70.0000.00817.93
8.2.60.0000.00818.01
8.2.50.0000.00918.10
8.2.40.0000.00718.22
8.2.30.0040.00419.43
8.2.20.0040.00417.64
8.2.10.0000.00817.75
8.2.00.0080.00017.72
8.1.280.0100.00725.92
8.1.270.0000.00723.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.46
8.1.230.0110.00020.78
8.1.220.0040.00417.79
8.1.210.0040.00418.88
8.1.200.0060.00317.23
8.1.190.0080.00017.23
8.1.180.0000.00918.10
8.1.170.0040.00418.61
8.1.160.0030.00518.89
8.1.150.0000.00818.67
8.1.140.0050.00217.45
8.1.130.0070.00017.83
8.1.120.0040.00417.54
8.1.110.0050.00317.51
8.1.100.0000.00717.50
8.1.90.0040.00417.47
8.1.80.0000.00717.49
8.1.70.0000.00717.40
8.1.60.0080.00017.63
8.1.50.0060.00317.53
8.1.40.0000.00817.52
8.1.30.0040.00417.63
8.1.20.0000.00817.69
8.1.10.0050.00217.57
8.1.00.0000.00817.46
8.0.300.0040.00419.90
8.0.290.0000.00716.75
8.0.280.0030.00618.50
8.0.270.0030.00317.23
8.0.260.0030.00318.38
8.0.250.0040.00417.07
8.0.240.0030.00617.05
8.0.230.0030.00317.05
8.0.220.0060.00316.94
8.0.210.0040.00416.95
8.0.200.0030.00317.02
8.0.190.0000.00717.02
8.0.180.0040.00416.89
8.0.170.0000.00716.90
8.0.160.0080.00017.00
8.0.150.0050.00216.81
8.0.140.0040.00416.96
8.0.130.0060.00013.30
8.0.120.0050.00316.98
8.0.110.0000.00816.79
8.0.100.0040.00416.91
8.0.90.0000.00816.86
8.0.80.0060.01217.04
8.0.70.0000.00716.99
8.0.60.0000.00717.00
8.0.50.0000.00716.93
8.0.30.0110.00817.12
8.0.20.0120.00717.40
8.0.10.0050.00217.05
8.0.00.0110.00716.84
7.4.330.0000.00616.79
7.4.320.0070.00016.61
7.4.300.0000.00716.61
7.4.290.0000.00716.42
7.4.280.0000.00716.61
7.4.270.0000.00616.54
7.4.260.0000.00513.29
7.4.250.0020.00516.48
7.4.240.0040.00416.63
7.4.230.0020.00516.64
7.4.220.0180.00016.47
7.4.210.0090.00616.64
7.4.200.0000.00716.41
7.4.190.0040.00416.42
7.4.160.0120.00416.50
7.4.150.0150.00317.40
7.4.140.0100.00817.86
7.4.130.0100.00716.55
7.4.120.0110.00716.62
7.4.110.0100.01016.39
7.4.100.0030.01316.45
7.4.90.0060.01116.61
7.4.80.0060.01219.39
7.4.70.0070.01016.65
7.4.60.0060.01116.59
7.4.50.0060.00316.42
7.4.40.0070.01022.77
7.4.30.0130.00316.51
7.4.10.0110.00714.90
7.4.00.0080.00914.92
7.3.330.0000.00513.31
7.3.320.0000.00513.46
7.3.310.0000.00716.55
7.3.300.0030.00316.39
7.3.290.0110.00816.45
7.3.280.0060.01116.47
7.3.270.0070.01117.40
7.3.260.0090.00918.24
7.3.250.0120.00516.54
7.3.240.0000.01716.49
7.3.230.0060.01016.58
7.3.210.0030.01416.47
7.3.200.0130.00919.39
7.3.190.0090.00816.64
7.3.180.0090.00616.45
7.3.170.0060.01016.49
7.3.160.0100.00616.32
7.3.130.0080.00914.94
7.3.120.0070.01114.81
7.3.110.0070.01114.80
7.3.100.0030.01014.94
7.3.90.0070.01414.64
7.3.80.0070.00715.21
7.3.70.0060.00614.80
7.3.60.0060.01114.77
7.3.50.0030.01414.98
7.3.40.0090.00615.00
7.3.30.0070.00714.93
7.3.20.0040.01416.68
7.3.10.0110.00616.70
7.3.00.0050.00516.77
7.2.330.0090.01216.59
7.2.320.0120.01216.76
7.2.310.0120.00616.76
7.2.300.0090.00716.38
7.2.290.0090.00616.50
7.2.260.0120.00615.05
7.2.250.0060.01315.20
7.2.240.0040.01115.19
7.2.230.0000.01615.26
7.2.220.0070.01115.04
7.2.210.0060.00915.24
7.2.200.0090.00015.05
7.2.190.0000.01515.23
7.2.180.0090.00615.02
7.2.170.0100.00714.87
7.2.160.0040.01514.95
7.2.150.0110.00317.09
7.2.140.0150.00316.67
7.2.130.0130.00316.82
7.2.120.0060.00916.64
7.2.110.0070.01017.06
7.2.100.0090.00016.69
7.2.90.0030.00617.05
7.2.80.0030.00916.69
7.2.70.0060.00616.89
7.2.60.0000.01116.79
7.2.50.0130.00317.01
7.2.40.0070.00716.87
7.2.30.0070.00717.12
7.2.20.0000.01017.20
7.2.10.0060.01017.20
7.2.00.0030.01218.32
7.1.330.0000.01315.92
7.1.320.0120.00615.62
7.1.310.0110.00415.55
7.1.300.0070.01015.75
7.1.290.0030.00615.52
7.1.280.0080.00615.87
7.1.270.0060.00915.72
7.1.260.0040.01115.89
7.1.250.0070.00415.90
7.1.240.0060.00615.94
7.1.230.0060.00315.75
7.1.220.0000.01615.82
7.1.210.0060.00615.62
7.1.200.0090.00615.84
7.1.190.0100.00615.89
7.1.180.0070.01115.97
7.1.170.0030.01315.58
7.1.160.0080.00415.52
7.1.150.0030.01015.97
7.1.140.0080.00815.93
7.1.130.0070.00415.81
7.1.120.0040.00715.56
7.1.110.0000.01315.88
7.1.100.0070.00416.87
7.1.90.0040.01115.83
7.1.80.0090.00615.99
7.1.70.0010.01116.55
7.1.60.0020.01116.43
7.1.50.0060.00816.21
7.1.40.0030.00615.90
7.1.30.0100.00715.57
7.1.20.0000.01215.93
7.1.10.0040.01115.88
7.1.00.0050.02718.99
7.0.330.0070.00715.53
7.0.320.0070.00715.19
7.0.310.0120.00315.06
7.0.300.0060.00915.19
7.0.290.0060.00915.52
7.0.280.0090.00015.24
7.0.270.0060.00315.16
7.0.260.0030.00715.42
7.0.250.0140.00015.43
7.0.240.0030.01015.61
7.0.230.0060.00915.30
7.0.220.0000.01115.44
7.0.210.0060.00915.52
7.0.200.0070.00516.17
7.0.190.0030.01015.38
7.0.180.0070.00715.52
7.0.170.0070.00315.27
7.0.160.0000.01615.64
7.0.150.0030.00915.30
7.0.140.0050.04018.77
7.0.130.0100.00315.21
7.0.120.0040.01115.35
7.0.110.0070.00715.41
7.0.100.0020.04817.72
7.0.90.0060.02517.63
7.0.80.0180.03017.79
7.0.70.0170.03317.71
7.0.60.0210.04117.69
7.0.50.0230.04417.89
7.0.40.0120.04216.72
7.0.30.0080.04016.77
7.0.20.0080.04316.74
7.0.10.0080.04816.83
7.0.00.0090.04416.77
5.6.400.0060.00914.42
5.6.390.0070.00414.39
5.6.380.0030.01314.18
5.6.370.0030.01014.31
5.6.360.0040.01514.59
5.6.350.0100.00714.32
5.6.340.0040.01214.52
5.6.330.0070.00714.77
5.6.320.0080.00414.57
5.6.310.0060.00614.49
5.6.300.0060.00614.52
5.6.290.0100.00714.68
5.6.280.0080.03517.53
5.6.270.0060.00914.50
5.6.260.0060.00314.18
5.6.250.0050.04817.49
5.6.240.0100.04217.58
5.6.230.0130.04117.52
5.6.220.0070.02617.58
5.6.210.0050.04517.48
5.6.200.0050.05017.69
5.6.190.0050.04617.64
5.6.180.0050.04817.69
5.6.170.0030.05217.73
5.6.160.0120.04217.78
5.6.150.0100.04117.72
5.6.140.0130.04017.69
5.6.130.0050.04617.83
5.6.120.0030.04817.73
5.6.110.0070.04617.66
5.6.100.0120.03717.54
5.6.90.0050.04717.86
5.6.80.0080.02017.45
5.6.70.0070.04717.49
5.6.60.0100.02717.33
5.6.50.0080.03217.24
5.6.40.0030.04117.52
5.6.30.0060.03517.33
5.6.20.0090.04117.40
5.6.10.0050.03617.33
5.6.00.0100.04017.38
5.5.380.0070.04217.39
5.5.370.0040.02417.49
5.5.360.0060.04317.46
5.5.350.0020.03317.34
5.5.340.0050.04517.56
5.5.330.0050.03217.42
5.5.320.0100.04117.69
5.5.310.0050.04617.70
5.5.300.0060.04117.69
5.5.290.0050.03217.64
5.5.280.0140.03817.44
5.5.270.0140.03517.55
5.5.260.0000.04917.75
5.5.250.0090.04017.38
5.5.240.0050.04317.16
5.5.230.0050.05017.17
5.5.220.0070.04217.25
5.5.210.0090.04017.23
5.5.200.0050.04517.17
5.5.190.0070.04517.13
5.5.180.0050.04817.17
5.5.170.0160.00014.46
5.5.160.0070.04217.22
5.5.150.0070.04317.10
5.5.140.0140.04017.11
5.5.130.0070.04817.20
5.5.120.0080.04017.37
5.5.110.0100.04317.34
5.5.100.0080.02317.17
5.5.90.0040.04417.11
5.5.80.0050.04517.14
5.5.70.0020.04617.25
5.5.60.0080.03816.97
5.5.50.0030.04517.09
5.5.40.0100.04317.14
5.5.30.0100.03817.16
5.5.20.0080.04017.21
5.5.10.0090.03917.15
5.5.00.0050.04317.15
5.4.450.0090.03915.24
5.4.440.0020.04815.35
5.4.430.0020.04015.36
5.4.420.0080.03715.24
5.4.410.0050.04215.10
5.4.400.0050.04215.03
5.4.390.0070.03714.96
5.4.380.0060.02614.94
5.4.370.0050.04214.97
5.4.360.0120.03315.27
5.4.350.0030.04315.10
5.4.340.0050.04314.88
5.4.330.0070.00311.20
5.4.320.0050.04215.13
5.4.310.0110.04015.05
5.4.300.0050.04215.03
5.4.290.0020.03615.19
5.4.280.0050.03615.14
5.4.270.0080.03615.04
5.4.260.0050.03915.05
5.4.250.0050.04115.09
5.4.240.0020.04415.11
5.4.230.0100.03715.29
5.4.220.0050.02715.00
5.4.210.0100.04015.13
5.4.200.0050.03514.83
5.4.190.0070.04315.08
5.4.180.0020.04114.88
5.4.170.0100.03315.15
5.4.160.0060.04514.99
5.4.150.0050.04215.09
5.4.140.0050.03813.59
5.4.130.0000.02713.65
5.4.120.0070.03013.72
5.4.110.0020.02513.88
5.4.100.0110.01713.77
5.4.90.0050.01913.96
5.4.80.0050.02113.90
5.4.70.0030.03113.71
5.4.60.0030.02013.73
5.4.50.0020.02013.80
5.4.40.0080.03313.80
5.4.30.0030.02613.87
5.4.20.0050.03713.80
5.4.10.0060.03413.80
5.4.00.0090.02713.34
5.3.290.0060.04012.70
5.3.280.0080.03512.58
5.3.270.0020.02812.66
5.3.260.0060.04012.52
5.3.250.0120.03512.66
5.3.240.0100.03312.62
5.3.230.0070.04012.67
5.3.220.0050.03012.56
5.3.210.0050.02412.50
5.3.200.0060.01812.54
5.3.190.0050.01912.50
5.3.180.0020.02312.62
5.3.170.0000.02312.64
5.3.160.0020.02512.62
5.3.150.0060.02012.64
5.3.140.0020.04112.59
5.3.130.0070.02212.54
5.3.120.0050.03512.50
5.3.110.0080.01812.53
5.3.100.0060.04012.29
5.3.90.0080.03312.41
5.3.80.0020.03212.16
5.3.70.0030.02312.21
5.3.60.0020.04012.29
5.3.50.0030.03712.26
5.3.40.0050.03012.32
5.3.30.0040.03412.38
5.3.20.0070.02612.12
5.3.10.0000.02611.99
5.3.00.0020.02912.08
5.2.170.0070.02311.24
5.2.160.0070.04711.18
5.2.150.0000.06011.07
5.2.140.0000.03311.17
5.2.130.0030.03011.12
5.2.120.0030.05011.19
5.2.110.0000.03311.22
5.2.100.0000.06011.20
5.2.90.0000.05011.09
5.2.80.0030.03011.01
5.2.70.0000.03011.03
5.2.60.0000.03310.96
5.2.50.0030.06011.05
5.2.40.0030.02710.91
5.2.30.0030.02710.89
5.2.20.0000.04011.07
5.2.10.0000.04710.78
5.2.00.0000.03310.77
5.1.60.0000.0279.98
5.1.50.0030.02010.08
5.1.40.0030.02310.09
5.1.30.0030.02710.35
5.1.20.0000.02710.35
5.1.10.0000.02710.19
5.1.00.0000.0279.95
5.0.50.0070.0209.20
5.0.40.0000.0239.20
5.0.30.0070.0339.20
5.0.20.0000.0409.20
5.0.10.0000.0209.20
5.0.00.0000.0309.20
4.4.90.0000.0209.20
4.4.80.0000.0209.20
4.4.70.0000.0279.20
4.4.60.0000.0179.20
4.4.50.0030.0139.20
4.4.40.0000.0239.20
4.4.30.0070.0109.20
4.4.20.0000.0209.20
4.4.10.0030.0209.20
4.4.00.0000.0279.20
4.3.110.0070.0109.20
4.3.100.0030.0109.20
4.3.90.0000.0139.20
4.3.80.0000.0409.20
4.3.70.0030.0309.20
4.3.60.0000.0179.20
4.3.50.0030.0179.20
4.3.40.0000.0309.20
4.3.30.0000.0179.20
4.3.20.0000.0179.20
4.3.10.0000.0139.20
4.3.00.0030.0139.20

preferences:
50.58 ms | 401 KiB | 5 Q