3v4l.org

run code in 300+ PHP versions simultaneously
<?php // PHP 8.1 class Exemplo { public readonly string $text; public function __construct(string $text) { // aqui podemos alterar $this->text = $text; } public function setText(string $newText): void { // aqui não podemos $this->text = $newText; } } $exemplo = new Exemplo("Ola mundo"); var_dump($exemplo->text); // string(Ola mundo) // descomente para ver o erro // $exemplo->setText("Adeus mundo"); // aqui também não podemos // descomente para ver o erro // $exemplo->text = "Adeus mundo";

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.00.0150.01020.02
8.4.150.0020.00014.05
8.4.140.0140.00917.84
8.4.130.0110.00520.32
8.4.120.0100.00924.06
8.4.110.0130.00419.57
8.4.100.0100.00818.75
8.4.90.0090.01018.59
8.4.80.0080.00318.75
8.4.70.0090.00917.77
8.4.60.0120.00818.46
8.4.50.0120.00819.42
8.4.40.0040.00717.76
8.4.30.0160.00320.48
8.4.20.0070.00319.66
8.4.10.0040.00419.41
8.3.280.0120.00818.19
8.3.270.0100.01016.38
8.3.260.0060.00316.60
8.3.250.0110.00718.86
8.3.240.0100.00916.98
8.3.230.0120.00716.25
8.3.220.0070.01118.82
8.3.210.0060.00416.52
8.3.200.0040.00516.43
8.3.190.0120.00817.29
8.3.180.0080.00716.52
8.3.170.0120.00316.77
8.3.160.0120.00917.13
8.3.150.0110.00717.20
8.3.140.0110.00716.45
8.3.130.0040.00718.24
8.3.120.0030.00618.99
8.3.110.0050.00322.58
8.3.100.0000.01020.94
8.3.90.0040.00420.94
8.3.50.0030.00520.94
8.2.290.0070.00420.52
8.2.280.0110.00820.02
8.2.270.0050.00318.84
8.2.260.0120.00616.67
8.2.250.0070.00318.71
8.2.240.0040.01117.03
8.2.230.0120.00420.94
8.2.220.0130.00622.58
8.2.210.0000.00822.58
8.1.330.0130.00722.01
8.1.320.0070.01216.00
8.1.310.0100.00718.41
8.1.300.0080.00016.54
8.1.20.0040.00917.58

preferences:
29.15 ms | 403 KiB | 5 Q