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 = 'blue') { $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); 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.0070.01018.29
8.3.50.0180.01122.11
8.3.40.0110.00418.93
8.3.30.0150.00018.75
8.3.20.0000.00818.89
8.3.10.0030.00521.17
8.3.00.0040.00419.92
8.2.180.0140.00016.63
8.2.170.0040.01122.96
8.2.160.0150.00420.45
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0090.00026.16
8.2.120.0040.00421.00
8.2.110.0060.00320.22
8.2.100.0120.00017.91
8.2.90.0000.00919.00
8.2.80.0040.00419.31
8.2.70.0060.00617.63
8.2.60.0030.00517.79
8.2.50.0030.00618.07
8.2.40.0080.00018.22
8.2.30.0040.00421.10
8.2.20.0000.00717.59
8.2.10.0000.00717.87
8.2.00.0040.00417.74
8.1.280.0060.01125.92
8.1.270.0040.00423.99
8.1.260.0130.00326.35
8.1.250.0060.00328.09
8.1.240.0060.00322.61
8.1.230.0040.00820.88
8.1.220.0080.00018.77
8.1.210.0100.00018.77
8.1.200.0000.00917.35
8.1.190.0040.00417.40
8.1.180.0040.00418.10
8.1.170.0000.00818.48
8.1.160.0070.00018.88
8.1.150.0040.00418.66
8.1.140.0000.00717.34
8.1.130.0030.00317.74
8.1.120.0030.00317.45
8.1.110.0000.00717.37
8.1.100.0040.00417.52
8.1.90.0050.00217.36
8.1.80.0000.00817.35
8.1.70.0000.00717.44
8.1.60.0000.00917.50
8.1.50.0040.00417.51
8.1.40.0030.00617.48
8.1.30.0040.00417.58
8.1.20.0000.00817.56
8.1.10.0000.00717.59
8.1.00.0030.00617.59
8.0.300.0020.00520.02
8.0.290.0050.00317.05
8.0.280.0030.00518.45
8.0.270.0000.00716.88
8.0.260.0000.00616.86
8.0.250.0000.00717.04
8.0.240.0040.00417.05
8.0.230.0070.00017.04
8.0.220.0060.00316.96
8.0.210.0050.00316.97
8.0.200.0030.00317.03
8.0.190.0040.00417.05
8.0.180.0040.00417.02
8.0.170.0060.00317.04
8.0.160.0000.01217.06
8.0.150.0050.00316.96
8.0.140.0000.00716.93
8.0.130.0000.00613.43
8.0.120.0030.00516.93
8.0.110.0040.00416.96
8.0.100.0040.00416.87
8.0.90.0030.00516.88
8.0.80.0130.00317.03
8.0.70.0000.00816.82
8.0.60.0000.00717.04
8.0.50.0050.00217.00
8.0.30.0080.01117.23
8.0.20.0100.01017.40
8.0.10.0030.00516.98
8.0.00.0110.00717.02
7.4.330.0000.00516.78
7.4.320.0000.00716.53
7.4.300.0030.00316.38
7.4.290.0000.00716.61
7.4.280.0070.00016.58
7.4.270.0030.00316.60
7.4.260.0050.00013.25
7.4.250.0040.00416.50
7.4.240.0070.00016.64
7.4.230.0000.00716.57
7.4.220.0150.00916.43
7.4.210.0060.01016.53
7.4.200.0000.00716.64
7.4.190.0070.00016.56
7.4.160.0120.00516.56
7.4.150.0130.00417.40
7.4.140.0120.00517.86
7.4.130.0110.00716.52
7.4.120.0100.00716.44
7.4.110.0110.00716.66
7.4.100.0050.01116.47
7.4.90.0060.01116.61
7.4.80.0120.00619.39
7.4.70.0030.01216.66
7.4.60.0060.01616.54
7.4.50.0080.00016.70
7.4.40.0100.00622.77
7.4.30.0100.00716.48
7.4.00.0090.00814.95
7.3.330.0000.00513.52
7.3.320.0050.00013.46
7.3.310.0030.00316.26
7.3.300.0030.00316.48
7.3.290.0100.00416.44
7.3.280.0070.01016.46
7.3.270.0130.00617.40
7.3.260.0100.00818.24
7.3.250.0090.01016.46
7.3.240.0090.00916.30
7.3.230.0070.01716.39
7.3.210.0060.01316.65
7.3.200.0130.00919.39
7.3.190.0160.00716.30
7.3.180.0100.00616.45
7.3.170.0090.00616.43
7.3.160.0160.00016.38
7.3.120.0050.01214.90
7.3.110.0060.01115.00
7.3.100.0000.01715.00
7.3.90.0090.00614.96
7.3.80.0060.00614.76
7.3.70.0070.00714.71
7.3.60.0060.00615.03
7.3.50.0000.01015.05
7.3.40.0100.00614.48
7.3.30.0000.01215.00
7.3.20.0090.00016.87
7.3.10.0030.00616.41
7.3.00.0000.01216.78
7.2.330.0070.01016.83
7.2.320.0090.01616.67
7.2.310.0090.00916.81
7.2.300.0070.01116.59
7.2.290.0100.00616.45
7.2.250.0000.01715.25
7.2.240.0060.01415.04
7.2.230.0060.00915.26
7.2.220.0140.00314.87
7.2.210.0030.01415.04
7.2.200.0100.00714.93
7.2.190.0070.00715.06
7.2.180.0080.00314.98
7.2.170.0040.00715.29
7.2.00.0030.01319.61
7.1.330.0030.01415.93
7.1.320.0040.00715.88
7.1.310.0070.00715.79
7.1.300.0040.01115.97
7.1.290.0030.00715.61
7.1.280.0030.00915.80
7.1.270.0040.00715.84
7.1.260.0060.00915.87
7.1.100.0930.01116.19
7.1.70.0080.00417.18
7.1.60.0070.00717.34
7.1.50.0040.01116.66
7.1.40.0070.00716.53
7.1.30.0030.01216.40
7.1.20.0100.00716.80
7.1.10.0120.00416.60
7.1.00.0120.00316.78
7.0.200.0140.00716.64
7.0.190.0060.00616.76
7.0.180.0040.00816.21
7.0.170.0120.00016.31
7.0.160.0040.00816.29
7.0.150.0030.01016.43
7.0.140.0060.00616.41
7.0.130.0040.01116.53
7.0.120.0030.00916.59
7.0.110.0080.00816.46
7.0.100.0100.00716.38
7.0.90.0090.00516.30
7.0.80.0040.01216.38
7.0.70.0090.00416.27
7.0.60.0070.00716.13
7.0.50.0160.01016.60
7.0.40.0110.00015.12
7.0.30.0000.01215.12
7.0.20.0070.00315.12
7.0.10.0040.00715.12
7.0.00.0040.00815.12
5.6.300.0030.04320.63
5.6.290.0100.04220.85
5.6.280.0070.04721.02
5.6.270.0000.06321.04
5.6.260.0140.03321.04
5.6.250.0100.03620.83
5.6.240.0030.04620.97
5.6.230.0000.05120.96
5.6.220.0120.03320.82
5.6.210.0040.04320.64
5.6.200.0030.04821.03
5.6.190.0070.04320.95
5.6.180.0030.04420.85
5.6.170.0060.03920.75
5.6.160.0070.04720.83
5.6.150.0060.05820.84
5.6.140.0030.04721.02
5.6.130.0040.04221.04
5.6.120.0070.04320.82
5.6.110.0060.06721.02
5.6.100.0030.04420.73
5.6.90.0070.05120.84
5.6.80.0030.05020.24
5.6.70.0040.03920.12
5.6.60.0060.06920.41
5.6.50.0040.03920.31
5.6.40.0030.05020.10
5.6.30.0040.04220.20
5.6.20.0000.04320.12
5.6.10.0000.05520.29
5.6.00.0000.04220.29
5.5.380.0070.05017.57
5.5.370.0100.04117.58
5.5.360.0200.04717.47
5.5.350.0100.04617.55
5.5.340.0000.04917.77
5.5.330.0070.04017.74
5.5.320.0030.04018.01
5.5.310.0070.04017.84
5.5.300.0030.04017.84
5.5.290.0060.04717.86
5.5.280.0040.04718.18
5.5.270.0030.07317.70
5.5.260.0030.05018.13
5.5.250.0090.03617.55
5.5.240.0000.04517.47
5.5.230.0030.03917.39
5.5.220.0030.03717.56
5.5.210.0000.04717.38
5.5.200.0060.03517.48
5.5.190.0070.04517.44
5.5.180.0030.04117.46
5.5.160.0000.04017.35
5.5.150.0070.03717.35
5.5.140.0030.04017.46
5.5.130.0030.04317.09
5.5.120.0030.04517.43
5.5.110.0000.04117.34
5.5.100.0030.03816.96
5.5.90.0070.03917.09
5.5.80.0030.03617.29
5.5.70.0040.03917.33
5.5.60.0030.03817.34
5.5.50.0070.04417.28
5.5.40.0030.04517.35
5.5.30.0030.04217.27
5.5.20.0160.03817.33
5.5.10.0030.04417.31
5.5.00.0240.03417.41
5.4.450.0040.05519.25
5.4.440.0040.04019.28
5.4.430.0030.04419.51
5.4.420.0030.08419.38
5.4.410.0060.03519.33
5.4.400.0060.03618.96
5.4.390.0100.03318.95
5.4.380.0030.04119.14
5.4.370.0070.03619.19
5.4.360.0000.04119.11
5.4.350.0000.04219.14
5.4.340.0210.03818.98
5.4.320.0030.04119.06
5.4.310.0090.03618.98
5.4.300.0070.03619.05
5.4.290.0060.03919.05
5.4.280.0060.03618.97
5.4.270.0130.04019.05
5.4.260.0040.03918.94
5.4.250.0070.03319.20
5.4.240.0030.04718.94
5.4.230.0030.04518.98
5.4.220.0030.04019.21
5.4.210.0060.03919.05
5.4.200.0000.04419.11
5.4.190.0100.03319.06
5.4.180.0030.04319.10
5.4.170.0120.03918.97
5.4.160.0130.03219.18
5.4.150.0090.03518.96
5.4.140.0070.03716.75
5.4.130.0090.03416.73
5.4.120.0040.04216.55
5.4.110.0030.03816.51
5.4.100.0030.03816.76
5.4.90.0130.02916.79
5.4.80.0100.03316.61
5.4.70.0000.04616.74
5.4.60.0070.03816.38
5.4.50.0060.03816.66
5.4.40.0030.03816.75
5.4.30.0090.02816.60
5.4.20.0000.04216.74
5.4.10.0000.04216.61
5.4.00.0030.03615.95
5.3.290.0060.04215.12
5.3.280.0000.04115.12
5.3.270.0300.03715.12
5.3.260.0140.04615.12
5.3.250.0000.04715.12
5.3.240.0070.04115.12
5.3.230.0030.04015.12
5.3.220.0090.03715.12
5.3.210.0030.03815.12
5.3.200.0030.04315.12
5.3.190.0000.04115.12
5.3.180.0320.03215.12
5.3.170.0030.03715.12
5.3.160.0070.03615.12
5.3.150.0030.04415.12
5.3.140.0030.04115.12
5.3.130.0070.03215.12
5.3.120.0040.03615.12
5.3.110.0040.04115.12
5.3.100.0030.04515.12
5.3.90.0030.03815.12
5.3.80.0000.04415.12
5.3.70.0000.04315.12
5.3.60.0070.03615.12
5.3.50.0100.03015.12
5.3.40.0030.04115.12
5.3.30.0070.03815.12
5.3.20.0070.03515.12
5.3.10.0040.03815.12
5.3.00.0000.04315.12
5.2.170.0000.03615.12
5.2.160.0030.03115.12
5.2.150.0030.03215.12
5.2.140.0030.03415.12
5.2.130.0040.03215.12
5.2.120.0000.03615.12
5.2.110.0120.02315.12
5.2.100.0000.03415.12
5.2.90.0060.03215.12
5.2.80.0040.04215.12
5.2.70.0120.03015.12
5.2.60.0000.03815.12
5.2.50.0040.03415.12
5.2.40.0030.03115.12
5.2.30.0000.03415.12
5.2.20.0110.02615.12
5.2.10.0000.03415.12
5.2.00.0000.03215.12
5.1.60.0070.02615.12
5.1.50.0000.03015.12
5.1.40.0030.02415.12
5.1.30.0070.02415.12
5.1.20.0090.02315.12
5.1.10.0040.02315.12
5.1.00.0030.02715.12
5.0.50.0060.01615.12
5.0.40.0030.01915.12
5.0.30.0000.03315.12
5.0.20.0060.01715.12
5.0.10.0030.02715.12
5.0.00.0040.02815.12
4.4.90.0080.01115.12
4.4.80.0050.01315.12
4.4.70.0030.01715.12
4.4.60.0000.01815.12
4.4.50.0030.01315.12
4.4.40.0000.03015.12
4.4.30.0030.01315.12
4.4.20.0060.01815.12
4.4.10.0000.01915.12
4.4.00.0000.02715.12
4.3.110.0050.01315.12
4.3.100.0040.02115.12
4.3.90.0040.01415.12
4.3.80.0000.03115.12
4.3.70.0030.02015.12
4.3.60.0000.01815.12
4.3.50.0000.01915.12
4.3.40.0000.02815.12
4.3.30.0030.01515.12
4.3.20.0000.01815.12
4.3.10.0030.01415.12
4.3.00.0000.02815.12

preferences:
40.84 ms | 401 KiB | 5 Q