3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Pont { private const UNITE = 'm²'; private float $longueur; private float $largeur; public function getSurface(): string { return ($this->longueur * $this->largeur) . ' ' . self::UNITE; } public function setLongueur(float $longueur) { $this->longueur = $longueur; } public function setLargeur(float $largeur) { $this->largeur = $largeur; } } $towerBridge = new Pont; $towerBridge->setLongueur(286.0); $towerBridge->setLargeur(15.0); echo $towerBridge->getSurface();

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.2.10.0040.00417.94
8.2.00.0040.00419.34
8.1.140.0000.00917.33
8.1.130.0050.00320.16
8.1.120.0140.00218.74
8.1.110.0050.01118.74
8.1.100.0120.00618.64
8.1.90.0080.00818.63
8.1.80.0150.00018.64
8.1.70.0040.01218.56
8.1.60.0120.00618.84
8.1.50.0050.01418.71
8.1.40.0140.00518.86
8.1.30.0100.01018.84
8.1.20.0130.00618.84
8.1.10.0170.00318.73
8.1.00.0130.00618.72
8.0.260.0040.00918.02
8.0.250.0150.00018.08
8.0.240.0150.00017.96
8.0.230.0120.00417.94
8.0.220.0100.00517.92
8.0.210.0080.00818.00
8.0.200.0050.01018.07
8.0.190.0130.00318.06
8.0.180.0120.00217.94
8.0.170.0070.00718.11
8.0.160.0060.00817.99
8.0.150.0160.00018.02
8.0.140.0040.00818.00
8.0.130.0130.00317.88
8.0.120.0100.00518.04
8.0.110.0090.00618.04
8.0.100.0040.01117.91
8.0.90.0090.00517.92
8.0.80.0110.00518.01
8.0.70.0110.00517.92
8.0.60.0150.00017.84
8.0.50.0050.01017.93
8.0.30.0050.01117.92
8.0.20.0120.00418.00
8.0.10.0090.00618.08
7.4.330.0120.00215.57
7.4.320.0180.00017.64
7.4.300.0160.00317.57
7.4.290.0110.00717.54
7.4.280.0130.00317.63
7.4.270.0090.00617.72
7.4.260.0060.00317.59
7.4.250.0070.00317.66
7.4.240.0100.00017.64
7.4.230.0140.00017.65
7.4.220.0090.00417.65
7.4.210.0110.00317.66
7.4.200.0140.00017.53
7.4.190.0120.00417.77
7.4.180.0100.00317.96
7.4.160.0080.00517.65
7.4.150.0070.00717.55
7.4.140.0140.00017.61
7.4.130.0090.00317.60
7.4.120.0070.00717.47
7.4.110.0140.00017.57
7.4.100.0100.00317.53
7.4.90.0120.00217.70
7.4.80.0110.00417.59
7.4.70.0090.00517.50
7.4.60.0080.00617.54
7.4.50.0100.00517.46
7.4.40.0110.00417.53
7.4.30.0060.00917.46
7.4.20.0090.00517.66
7.4.10.0110.00417.58
7.4.00.0080.00617.47

preferences:
10.99 ms | 403 KiB | 5 Q