3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Pont { public float $longueur; public float $largeur; public function getSurface(): float { return $this->longueur * $this->largeur; } } $pont = new Pont; $pont->longueur = 286.0; $pont->largeur = 15.0; $surface = $pont->getSurface(); var_dump($surface);

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.1.20.0030.00517.66
8.1.10.0110.00417.54
8.1.00.0130.00517.46
8.0.150.0040.00416.77
8.0.140.0070.00616.73
8.0.130.0100.00516.31
8.0.120.0100.00415.51
8.0.110.0070.00515.69
8.0.100.0070.00416.13
8.0.90.0050.00516.24
8.0.80.0060.00616.12
8.0.70.0070.00416.13
8.0.60.0060.00516.08
8.0.50.0060.00516.06
8.0.30.0070.00516.14
8.0.20.0070.00516.17
8.0.10.0060.00516.23
8.0.00.0040.00516.24
7.4.270.0070.00516.51
7.4.260.0100.00516.50
7.4.250.0100.00415.09
7.4.240.0080.00615.48
7.4.230.0090.00415.75
7.4.220.0060.00415.94
7.4.210.0070.00415.94
7.4.200.0060.00415.86
7.4.190.0080.00215.91
7.4.180.0060.00415.94
7.4.160.0070.00415.92
7.4.150.0060.00515.85
7.4.140.0060.00415.83
7.4.130.0080.00415.81
7.4.120.0070.00415.76
7.4.110.0070.00415.78
7.4.100.0070.00415.89
7.4.90.0070.00315.78
7.4.80.0070.00415.81
7.4.70.0070.00415.80
7.4.60.0050.00515.83
7.4.50.0060.00415.72
7.4.40.0060.00415.73
7.4.30.0060.00415.81
7.4.20.0070.00315.76
7.4.10.0060.00515.78
7.4.00.0060.00415.86
7.3.330.0110.00416.04
7.3.320.0100.00614.90
7.3.310.0100.00515.18
7.3.300.0080.00415.43
7.3.290.0070.00515.59
7.3.280.0090.00315.54
7.3.270.0070.00515.52
7.3.260.0080.00415.55
7.3.250.0080.00415.54
7.3.240.0080.00415.52
7.3.230.0090.00315.56
7.3.220.0080.00415.48
7.3.210.0070.00515.44
7.3.200.0080.00415.46
7.3.190.0070.00415.49
7.3.180.0070.00415.44
7.3.170.0060.00515.50
7.3.160.0070.00415.46
7.3.150.0070.00415.44
7.3.140.0060.00515.44
7.3.130.0070.00415.47
7.3.120.0080.00415.48
7.3.110.0080.00415.43
7.3.100.0080.00415.41
7.3.90.0070.00415.71
7.3.80.0070.00415.46
7.3.70.0070.00415.53
7.3.60.0060.00515.57
7.3.50.0070.00315.57
7.3.40.0070.00315.60
7.3.30.0070.00415.61
7.3.20.0070.00416.82
7.3.10.0070.00416.73
7.3.00.0080.00416.74

preferences:
14.47 ms | 455 KiB | 5 Q