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.4.20.0030.01720.64
8.4.10.0130.00618.31
8.3.150.0140.00421.03
8.3.140.0140.00116.84
8.3.130.0240.00416.46
8.3.120.0200.00616.87
8.3.110.0240.00717.87
8.3.100.0290.00518.52
8.3.90.0230.00918.57
8.3.80.0250.00517.54
8.3.70.0220.00717.63
8.3.60.0250.00618.48
8.3.50.0240.00418.23
8.3.40.0200.00719.07
8.3.30.0170.00619.13
8.3.20.0200.00519.60
8.3.10.0230.00619.67
8.3.00.0150.00620.88
8.2.260.0140.00516.54
8.2.250.0200.00616.50
8.2.240.0190.00516.94
8.2.230.0230.00717.48
8.2.220.0220.00419.81
8.2.210.0220.00518.57
8.2.200.0210.00717.60
8.2.190.0200.00717.52
8.2.180.0200.00819.19
8.2.170.0250.00419.23
8.2.160.0270.00519.64
8.2.150.0220.00719.87
8.2.140.0240.00419.70
8.2.130.0210.00620.56
8.2.120.0230.00420.59
8.2.110.0240.00720.17
8.2.100.0210.00619.81
8.2.90.0230.00619.76
8.2.80.0210.00519.57
8.2.70.0200.00532.70
8.2.60.0190.00726.89
8.2.50.0180.00726.81
8.2.40.0160.00424.69
8.2.30.0140.00725.63
8.2.20.0150.00524.64
8.2.10.0170.00424.37
8.2.00.0140.00623.84
8.1.310.0070.00416.28
8.1.300.0220.00616.57
8.1.290.0200.00518.76
8.1.280.0220.00619.04
8.1.270.0240.00619.59
8.1.260.0240.00620.56
8.1.250.0200.00520.68
8.1.240.0160.00720.02
8.1.230.0160.00519.93
8.1.220.0180.00519.38
8.1.210.0210.00519.56
8.1.200.0170.00526.76
8.1.190.0170.00626.70
8.1.180.0180.00626.76
8.1.170.0160.00726.21
8.1.160.0170.00525.70
8.1.150.0150.00524.55
8.1.140.0140.00524.32
8.1.130.0140.00523.25
8.1.120.0140.00623.28
8.1.110.0130.00723.27
8.1.100.0150.00623.24
8.1.90.0130.00622.30
8.1.80.0130.00521.64
8.1.70.0120.00721.60
8.1.60.0140.00621.75
8.1.50.0160.00521.67
8.1.40.0150.00621.85
8.1.30.0160.00521.63
8.1.20.0140.00621.32
8.1.10.0150.00521.40
8.1.00.0150.00621.32
8.0.300.0190.00618.98
8.0.290.0190.00326.35
8.0.280.0160.00625.38
8.0.270.0150.00624.21
8.0.260.0130.00623.39
8.0.250.0140.00522.89
8.0.240.0140.00622.95
8.0.230.0130.00622.89
8.0.220.0130.00521.86
8.0.210.0120.00521.43
8.0.200.0120.00521.47
8.0.190.0130.00421.54
8.0.180.0130.00521.50
8.0.170.0130.00521.38
8.0.160.0130.00521.12
8.0.150.0130.00520.95
8.0.140.0120.00520.85
8.0.130.0120.00620.42
8.0.120.0120.00520.50
8.0.110.0120.00420.24
8.0.100.0110.00620.24
8.0.90.0120.00520.21
8.0.80.0120.00520.28
8.0.70.0110.00520.22
8.0.60.0110.00620.18
8.0.50.0120.00520.20
8.0.30.0120.00520.16
8.0.20.0120.00520.26
8.0.10.0120.00520.28
8.0.00.0100.00520.28
7.4.330.0150.00322.28
7.4.320.0130.00321.84
7.4.300.0130.00521.10
7.4.290.0140.00521.22
7.4.280.0130.00420.84
7.4.270.0120.00620.62
7.4.260.0130.00520.43
7.4.250.0120.00620.23
7.4.240.0120.00520.11
7.4.230.0130.00419.99
7.4.220.0110.00520.00
7.4.210.0110.00519.99
7.4.200.0120.00519.99
7.4.190.0110.00520.00
7.4.180.0120.00420.02
7.4.160.0120.00420.05
7.4.150.0120.00519.98
7.4.140.0110.00619.99
7.4.130.0110.00519.98
7.4.120.0110.00519.77
7.4.110.0110.00419.93
7.4.100.0110.00519.97
7.4.90.0110.00519.97
7.4.80.0110.00519.94
7.4.70.0110.00519.95
7.4.60.0110.00519.92
7.4.50.0110.00519.86
7.4.40.0100.00519.88
7.4.30.0110.00419.92
7.4.20.0110.00519.91
7.4.10.0110.00419.94
7.4.00.0110.00419.93
7.3.330.0130.00520.20
7.3.320.0140.00419.94
7.3.310.0130.00419.88
7.3.300.0130.00419.78
7.3.290.0130.00519.77
7.3.280.0130.00519.77
7.3.270.0130.00519.77
7.3.260.0140.00419.78
7.3.250.0130.00419.80
7.3.240.0130.00519.75
7.3.230.0120.00519.74
7.3.220.0130.00419.72
7.3.210.0130.00519.74
7.3.200.0130.00519.73
7.3.190.0140.00519.73
7.3.180.0140.00419.70
7.3.170.0130.00519.71
7.3.160.0130.00519.73
7.3.150.0130.00519.74
7.3.140.0140.00419.74
7.3.130.0140.00419.72
7.3.120.0130.00419.73
7.3.110.0130.00519.69
7.3.100.0120.00519.78
7.3.90.0120.00519.90
7.3.80.0130.00519.76
7.3.70.0130.00419.76
7.3.60.0130.00419.81
7.3.50.0130.00419.81
7.3.40.0120.00519.79
7.3.30.0120.00419.79
7.3.20.0130.00520.78
7.3.10.0130.00520.70
7.3.00.0140.00420.74

preferences:
67.52 ms | 403 KiB | 5 Q