3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class Employee { public string $name; public int $age; public function __construct(string $n, int $a) { $this->name = $n; $this->age = $a; } public function getThis() { return $this; } public function getFullInfo() { return 'Меня зовут ' . $this->name . '. Мне ' . $this->age . ' года.' . PHP_EOL; } } $petr = new Employee('Петр', 23); $valera = new Employee('Валера', 54); print_r($petr->getThis()); print_r($valera->getThis()); echo $petr->getFullInfo(); echo $valera->getFullInfo();

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.30.0120.00519.47
8.5.20.0100.00718.49
8.5.10.0090.00916.81
8.5.00.0140.00719.79
8.4.180.0140.01023.76
8.4.170.0040.00622.06
8.4.160.0120.01023.98
8.4.150.0030.00014.05
8.4.140.0120.00817.57
8.4.130.0130.00817.66
8.4.120.0090.01020.52
8.4.110.0110.00822.50
8.4.100.0120.00917.80
8.4.90.0130.00522.57
8.4.80.0040.00519.40
8.4.70.0120.01218.07
8.4.60.0120.01118.75
8.4.50.0050.00318.68
8.4.40.0090.00917.46
8.4.30.0170.00318.93
8.4.20.0070.01319.39
8.4.10.0060.00319.63
8.3.300.0080.00120.56
8.3.290.0140.00918.19
8.3.280.0150.01218.27
8.3.270.0120.00816.85
8.3.260.0130.00616.68
8.3.250.0130.00619.10
8.3.240.0090.00816.48
8.3.230.0060.00316.80
8.3.220.0070.00919.22
8.3.210.0130.00516.63
8.3.200.0120.00816.48
8.3.190.0100.00817.38
8.3.180.0090.01016.61
8.3.170.0050.00318.91
8.3.160.0150.00318.54
8.3.150.0080.00020.82
8.3.140.0030.00620.54
8.3.130.0040.00418.43
8.3.120.0080.01119.04
8.3.110.0090.00020.94
8.3.100.0030.00616.54
8.3.90.0040.00418.58
8.3.80.0060.00318.43
8.3.70.0030.01316.63
8.3.60.0110.00418.18
8.3.50.0140.00716.60
8.3.40.0080.00623.55
8.3.30.0100.01018.84
8.3.20.0040.00424.18
8.3.10.0090.00024.66
8.3.00.0110.00726.16
8.2.300.0100.01018.17
8.2.290.0110.00720.59
8.2.280.0090.00918.24
8.2.270.0080.00017.00
8.2.260.0070.01018.96
8.2.250.0040.00416.44
8.2.240.0060.00318.80
8.2.230.0090.00022.58
8.2.220.0000.00824.06
8.2.210.0070.00726.77
8.2.200.0000.00916.38
8.2.190.0130.00616.75
8.2.180.0140.00318.54
8.2.170.0060.00919.05
8.2.160.0030.01022.96
8.2.150.0030.00625.66
8.2.140.0040.00424.66
8.2.130.0090.00926.16
8.2.120.0000.00821.00
8.2.110.0100.00020.90
8.2.100.0240.00718.44
8.2.90.0250.00618.44
8.2.80.0260.00318.44
8.2.70.0260.00318.44
8.2.60.0270.00618.44
8.2.50.0290.00218.44
8.2.40.0270.00318.44
8.2.30.0190.01018.44
8.2.20.0240.00518.44
8.2.10.0210.00618.44
8.2.00.0220.00418.44
8.1.340.0040.00617.82
8.1.330.0120.00721.88
8.1.320.0130.00616.27
8.1.310.0030.00716.48
8.1.300.0140.00019.53
8.1.290.0030.00618.88
8.1.280.0100.01025.92
8.1.270.0030.00524.66
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0110.00019.13
8.1.230.0190.00818.44
8.1.220.0270.00018.44
8.1.210.0250.00318.44
8.1.200.0230.00318.44
8.1.190.0220.00518.44
8.1.180.0170.00818.44
8.1.170.0240.00318.44
8.1.160.0220.00418.44
8.1.150.0260.00418.44
8.1.140.0180.00918.44
8.1.130.0290.00418.44
8.1.120.0170.01018.44
8.1.110.0240.00418.44
8.1.100.0270.00018.44
8.1.90.0230.00418.44
8.1.80.0200.00718.44
8.1.70.0200.00618.44
8.1.60.0190.00718.44
8.1.50.0240.00018.44
8.1.40.0180.00618.44
8.1.30.0200.00518.44
8.1.20.0210.00718.44
8.1.10.0180.00918.44
8.1.00.0120.01218.44
8.0.300.0170.00618.44
8.0.290.0280.00018.44
8.0.280.0220.00618.44
8.0.270.0390.00018.44
8.0.260.0270.00318.44
8.0.250.0250.00518.44
8.0.240.0240.00418.44
8.0.230.0250.00418.44
8.0.220.0240.00318.44
8.0.210.0210.00718.44
8.0.200.0140.01418.44
8.0.190.0250.00218.44
8.0.180.0150.01218.44
8.0.170.0220.00418.44
8.0.160.0170.01018.44
8.0.150.0170.00518.44
8.0.140.0230.00318.44
8.0.130.0150.00918.44
8.0.120.0280.00018.44
8.0.110.0250.00418.44
8.0.100.0290.00418.44
8.0.90.0270.00018.44
8.0.80.0170.00618.44
8.0.70.0200.00818.44
8.0.60.0160.01218.44
8.0.50.0220.00618.44
8.0.30.0220.00518.44
8.0.20.0170.01118.44
8.0.10.0260.00218.44

preferences:
41.32 ms | 403 KiB | 5 Q