3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Pont { // $unite ne sert que dans la classe, on met cette propriété en privé. private string $unite = 'm²'; public float $longueur; public float $largeur; public function getSurface(): string { return ($this->longueur * $this->largeur) . $this->unite; // on renvoie l’unité en plus de la surface }} $towerBridge = new Pont; $towerBridge->longueur = 286.0; $towerBridge->largeur = 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.0130.00320.55
8.4.10.0240.00718.44
8.3.140.0200.00917.36
8.3.130.0160.00717.35
8.3.120.0230.00617.21
8.3.110.0190.00816.53
8.3.100.0270.00518.61
8.3.90.0210.00619.29
8.3.80.0200.00621.59
8.3.70.0220.00719.18
8.3.60.0260.00919.80
8.3.50.0200.00519.64
8.3.40.0190.00720.22
8.3.30.0200.00920.46
8.3.20.0170.00822.28
8.3.10.0160.00722.77
8.3.00.0130.00722.88
8.2.260.0150.00316.64
8.2.250.0120.00216.60
8.2.240.0190.00416.78
8.2.230.0170.00517.12
8.2.220.0190.00617.73
8.2.210.0170.00618.92
8.2.200.0200.00621.60
8.2.190.0160.00818.89
8.2.180.0190.00621.41
8.2.170.0210.00720.38
8.2.160.0210.00621.14
8.2.150.0180.00721.90
8.2.140.0160.00822.42
8.2.130.0150.00722.97
8.2.120.0150.00722.59
8.2.110.0130.00822.43
8.2.100.0130.00721.53
8.2.90.0150.00621.65
8.2.80.0150.00621.49
8.2.70.0140.00539.84
8.2.60.0140.00722.98
8.2.50.0150.00622.88
8.2.40.0130.00522.17
8.2.30.0140.00622.34
8.2.20.0130.00522.18
8.2.10.0140.00522.15
8.2.00.0140.00521.83
8.1.310.0110.00316.88
8.1.300.0190.00816.81
8.1.290.0210.00620.75
8.1.280.0200.00920.30
8.1.270.0160.00622.40
8.1.260.0150.00623.08
8.1.250.0150.00622.99
8.1.240.0150.00622.22
8.1.230.0150.00621.84
8.1.220.0150.00721.36
8.1.210.0140.00621.44
8.1.200.0130.00722.55
8.1.190.0130.00622.80
8.1.180.0130.00622.80
8.1.170.0130.00622.70
8.1.160.0140.00522.26
8.1.150.0130.00622.19
8.1.140.0120.00621.97
8.1.130.0120.00621.49
8.1.120.0120.00521.36
8.1.110.0110.00621.26
8.1.100.0110.00520.77
8.1.90.0120.00520.60
8.1.80.0110.00520.46
8.1.70.0120.00420.30
8.1.60.0130.00520.51
8.1.50.0120.00620.37
8.1.40.0120.00520.08
8.1.30.0120.00619.79
8.1.20.0130.00620.00
8.1.10.0130.00619.70
8.1.00.0120.00619.69
8.0.300.0140.00621.76
8.0.290.0180.00522.38
8.0.280.0160.00621.63
8.0.270.0130.00621.78
8.0.260.0150.00521.08
8.0.250.0130.00520.99
8.0.240.0150.00520.84
8.0.230.0130.00520.32
8.0.220.0130.00420.15
8.0.210.0130.00520.03
8.0.200.0120.00520.07
8.0.190.0120.00519.97
8.0.180.0110.00619.99
8.0.170.0140.00619.65
8.0.160.0120.00519.36
8.0.150.0120.00519.29
8.0.140.0130.00419.22
8.0.130.0120.00618.91
8.0.120.0130.00518.71
8.0.110.0110.00518.81
8.0.100.0110.00618.69
8.0.90.0110.00518.56
8.0.80.0110.00518.75
8.0.70.0110.00518.76
8.0.60.0120.00518.70
8.0.50.0130.00518.70
8.0.30.0110.00518.75
8.0.20.0110.00518.79
8.0.10.0120.00518.72
8.0.00.0110.00518.91
7.4.330.0140.00420.20
7.4.320.0160.00520.49
7.4.300.0140.00519.79
7.4.290.0150.00519.76
7.4.280.0150.00419.08
7.4.270.0130.00518.97
7.4.260.0140.00518.80
7.4.250.0130.00518.64
7.4.240.0130.00518.56
7.4.230.0150.00418.54
7.4.220.0120.00518.46
7.4.210.0120.00518.46
7.4.200.0120.00518.47
7.4.190.0130.00521.03
7.4.180.0130.00418.49
7.4.160.0120.00518.50
7.4.150.0130.00418.43
7.4.140.0120.00518.41
7.4.130.0130.00418.40
7.4.120.0120.00518.41
7.4.110.0120.00518.40
7.4.100.0130.00518.45
7.4.90.0140.00418.40
7.4.80.0130.00418.41
7.4.70.0130.00418.42
7.4.60.0120.00518.40
7.4.50.0110.00618.35
7.4.40.0120.00518.34
7.4.30.0120.00518.41
7.4.20.0110.00518.41
7.4.10.0120.00418.40
7.4.00.0120.00418.37
7.3.330.0150.00518.60
7.3.320.0150.00518.41
7.3.310.0150.00518.31
7.3.300.0150.00418.30
7.3.290.0140.00518.19
7.3.280.0140.00518.20
7.3.270.0140.00518.22
7.3.260.0140.00518.18
7.3.250.0140.00518.22
7.3.240.0150.00518.19
7.3.230.0140.00518.20
7.3.220.0150.00518.14
7.3.210.0150.00518.16
7.3.200.0150.00418.15
7.3.190.0150.00418.16
7.3.180.0140.00518.17
7.3.170.0150.00518.19
7.3.160.0150.00518.16
7.3.150.0140.00418.14
7.3.140.0140.00518.16
7.3.130.0140.00418.14
7.3.120.0130.00518.14
7.3.110.0140.00418.13
7.3.100.0130.00518.11
7.3.90.0130.00518.35
7.3.80.0140.00518.16
7.3.70.0140.00518.22
7.3.60.0130.00518.24
7.3.50.0140.00418.25
7.3.40.0130.00518.24
7.3.30.0130.00518.24
7.3.20.0160.00419.24
7.3.10.0150.00419.18
7.3.00.0150.00519.20

preferences:
53.82 ms | 403 KiB | 5 Q