3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public string $name { get => $this->name; set => $this->name = ucfirst(trim($value)); } } class Employee extends Person { public function displayName(): string { // getName() was getter before return $this->getName(); } } $employee = new Employee(); $employee->name = 'John'; var_dump($employee->displayName());

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.130.0270.00817.88
8.4.120.0480.00917.83
8.4.110.0370.01217.51
8.4.100.0320.00417.89
8.4.90.0360.00917.68
8.4.80.0400.01017.76
8.4.70.0390.00618.04
8.4.60.0250.00617.78
8.4.50.0410.00817.94
8.4.40.0420.00817.67
8.4.30.0370.01317.40
8.4.20.0440.00717.63
8.4.10.0410.01117.48
8.3.260.0350.00816.78
8.3.250.0370.00716.61
8.3.240.0420.00516.69
8.3.230.0400.00716.57
8.3.220.0470.00416.81
8.3.210.0170.00416.66
8.3.200.0190.00316.47
8.3.190.0170.00416.85
8.3.180.0180.00316.65
8.3.170.0300.00716.60
8.3.160.0190.00416.58
8.3.150.0250.00416.48
8.3.140.0320.00116.77
8.3.130.0150.00516.48
8.3.120.0230.00516.48
8.3.110.0180.00216.68
8.3.100.0170.00516.53
8.3.90.0170.00716.68
8.3.80.0260.00316.43
8.3.70.0390.00816.64
8.3.60.0400.00816.30
8.3.50.0430.00716.56
8.3.40.0360.00817.64
8.3.30.0210.00917.47
8.3.20.0310.00917.47
8.3.10.0140.00417.65
8.3.00.0290.01217.53
8.2.290.0280.00916.43
8.2.280.0270.00416.65
8.2.270.0160.00316.53
8.2.260.0290.00616.67
8.2.250.0170.00616.42
8.2.240.0140.00616.61
8.2.230.0250.01016.54
8.2.220.0330.00916.47
8.2.210.0310.01016.30
8.2.200.0360.00616.21
8.2.190.0360.00616.42
8.2.180.0310.00716.46
8.2.170.0340.00717.54
8.2.160.0370.00917.45
8.2.150.0390.00517.43
8.2.140.0370.00817.28
8.2.130.0370.00717.19
8.2.120.0400.00417.21
8.2.110.0370.00817.54
8.2.100.0390.00517.60
8.2.90.0400.00717.55
8.2.80.0380.00917.32
8.2.70.0240.00517.52
8.2.60.0290.00917.11
8.2.50.0400.00917.30
8.2.40.0270.01317.41
8.2.30.0350.01317.14
8.2.20.0300.00517.41
8.2.10.0330.00717.49
8.2.00.0190.00617.36

preferences:
139.17 ms | 1008 KiB | 7 Q