3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Point { private $x; private $y; function __construct($x, $y) { $this->x = $x; $this->y = $y; } public function getX() { return $this->x; } public function getY() { return $this->y; } public function distanceFrom(Point $point) { return sqrt( pow($this->getX() - $point->getX(), 2) + pow($this->getY() - $point->getY(), 2) ); } } class Circle { private $center; private $radius; function __construct(Point $center, $radius) { $this->center = $center; $this->radius = $radius; } public function getCenter() { return $this->center; } public function getRadius() { return $this->radius; } public function contains(Point $point) { return $this->center->distanceFrom($point) <= $this->radius; } } $point = new Point(3, 4); $circle = new Circle(new Point(0,0), 2); var_dump($circle->contains($point));

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.5.10.0110.00618.59
8.5.00.0120.00819.98
8.4.150.0020.00114.05
8.4.140.0140.00717.54
8.4.130.0130.00117.79
8.4.120.0040.00524.13
8.4.110.0100.01022.52
8.4.100.0120.00517.73
8.4.90.0110.01017.87
8.4.80.0070.00417.65
8.4.70.0090.01017.76
8.4.60.0100.00917.52
8.4.50.0110.00918.45
8.4.40.0060.01517.54
8.4.30.0130.00720.49
8.4.20.0130.00618.13
8.4.10.0040.00417.75
8.3.280.0110.01018.23
8.3.270.0080.01216.61
8.3.260.0070.00316.44
8.3.250.0130.00619.14
8.3.240.0150.00517.04
8.3.230.0150.00416.73
8.3.220.0120.00617.34
8.3.210.0110.01016.59
8.3.200.0110.00916.29
8.3.190.0140.00516.45
8.3.180.0030.00618.57
8.3.170.0060.01318.91
8.3.160.0110.00720.03
8.3.150.0090.00916.61
8.3.140.0030.00617.03
8.3.130.0050.00318.16
8.3.120.0040.01119.16
8.3.110.0060.00320.94
8.3.100.0050.00324.06
8.3.90.0100.00726.77
8.3.80.0000.00916.63
8.3.70.0110.01116.58
8.3.60.0040.01118.18
8.3.50.0100.01020.09
8.3.40.0110.00418.68
8.3.30.0180.00018.77
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0040.00520.71
8.2.280.0050.00418.80
8.2.270.0120.00619.06
8.2.260.0120.00616.62
8.2.250.0030.01316.99
8.2.240.0000.00818.82
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0150.00326.77
8.2.200.0060.00316.63
8.2.190.0140.00716.58
8.2.180.0040.01525.92
8.2.170.0000.01418.83
8.2.160.0110.01122.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0070.00321.06
8.2.100.0090.00317.78
8.2.90.0000.00819.21
8.2.80.0090.00018.04
8.2.70.0050.00317.59
8.2.60.0040.00418.03
8.2.50.0080.00018.07
8.2.40.0030.00617.91
8.2.30.0040.00417.95
8.2.20.0050.00320.43
8.2.10.0040.00417.71
8.2.00.0000.00719.24
8.1.330.0120.00722.02
8.1.320.0030.00616.16
8.1.310.0130.00418.41
8.1.300.0070.01120.21
8.1.290.0000.00918.88
8.1.280.0090.00625.92
8.1.270.0060.00320.65
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00021.36
8.1.230.0160.00218.76
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0120.00216.98
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0050.00318.64
8.1.160.0000.00718.95
8.1.150.0000.00718.66
8.1.140.0000.00717.42
8.1.130.0050.00320.18
8.1.120.0050.00317.54
8.1.110.0000.00817.48
8.1.100.0000.00817.47
8.1.90.0070.00017.51
8.1.80.0030.00517.39
8.1.70.0040.00417.35
8.1.60.0000.00817.48
8.1.50.0030.00617.53
8.1.40.0040.00417.54
8.1.30.0030.00617.73
8.1.20.0090.00517.64
8.1.10.0050.00517.51
8.1.00.0060.00617.34
8.0.300.0080.00018.77
8.0.290.0040.00417.05
8.0.280.0030.00318.34
8.0.270.0070.00016.80
8.0.260.0000.00718.45
8.0.250.0000.00717.02
8.0.240.0030.00316.92
8.0.230.0030.00316.89
8.0.220.0030.00316.98
8.0.210.0000.00717.01
8.0.200.0000.00717.03
8.0.190.0050.00217.04
8.0.180.0030.00316.89
8.0.170.0080.00016.87
8.0.160.0000.00816.98
8.0.150.0040.00816.88
8.0.140.0050.00516.88
8.0.130.0030.00716.89
8.0.120.0050.00516.94
8.0.110.0030.00616.84
8.0.100.0000.01116.96
8.0.90.0120.00016.91
8.0.80.0060.00616.98
8.0.70.0030.00716.77
8.0.60.0080.00316.89
8.0.50.0040.00716.77
8.0.30.0000.01016.89
8.0.20.0110.00016.94
8.0.10.0040.00917.07
7.4.330.0030.00315.55
7.4.320.0000.00716.50
7.4.300.0000.00616.54
7.4.290.0060.00616.54
7.4.280.0040.00416.41
7.4.270.0070.00216.51
7.4.260.0130.00016.56
7.4.250.0110.00016.54
7.4.240.0000.01016.47
7.4.230.0100.00016.53
7.4.220.0040.00416.33
7.4.210.0030.00416.41
7.4.200.0050.00216.49
7.4.190.0030.00316.56
7.4.180.0000.00716.65
7.4.160.0070.00016.47
7.4.150.0040.00416.41
7.4.140.0030.00616.34
7.4.130.0040.00416.38
7.4.120.0040.00416.44
7.4.110.0090.00016.48
7.4.100.0000.00816.59
7.4.90.0050.00316.46
7.4.80.0060.00316.39
7.4.70.0070.00316.37
7.4.60.0060.00316.32
7.4.50.0050.00516.18
7.4.40.0000.01016.36
7.4.30.0050.00516.25
7.4.20.0040.00416.29
7.4.10.0050.00516.24
7.4.00.0050.00516.41

preferences:
18.29 ms | 403 KiB | 5 Q