3v4l.org

run code in 300+ PHP versions simultaneously
<?php class UserEntity{ protected $record = null; public function __construct(array $record){ $this->record = $record; } public function getEMail(){ return $this->record['email']; } } class UserRepository{ protected $pdo = null; public function __construct(?PDO $pdo){ $this->pdo = $pdo; } public function byId(int $id){ //faking. should probably be moved to a ::make method or something. return new UserEntity([ 'name' => 'John', 'email' => 'blah@blah.com', ]); } public function add(UserEntity $user){ //... } } $userRepository = new UserRepository(null); $user = $userRepository->byId(34); var_dump($user->getEMail());

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.3.70.0110.00416.66
8.3.60.0090.00618.43
8.3.50.0120.00618.16
8.3.40.0110.00418.46
8.3.30.0040.01118.46
8.3.20.0080.00018.68
8.3.10.0040.00419.16
8.3.00.0040.00423.48
8.2.190.0210.00018.48
8.2.180.0100.00718.66
8.2.170.0070.00722.96
8.2.160.0040.00922.08
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00421.07
8.2.120.0030.00526.35
8.2.110.0030.00621.12
8.2.100.0040.00817.91
8.2.90.0000.00917.63
8.2.80.0080.00317.97
8.2.70.0040.00417.79
8.2.60.0070.00018.03
8.2.50.0040.00418.10
8.2.40.0040.00421.02
8.2.30.0070.00020.73
8.2.20.0000.00718.06
8.2.10.0000.00718.15
8.2.00.0040.00418.25
8.1.280.0070.00725.92
8.1.270.0050.00320.38
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0000.01023.92
8.1.230.0000.01217.83
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0100.00017.23
8.1.190.0030.00617.23
8.1.180.0080.00018.10
8.1.170.0080.00018.61
8.1.160.0000.00718.77
8.1.150.0080.00018.73
8.1.140.0030.00418.89
8.1.130.0040.00421.92
8.1.120.0040.00417.43
8.1.110.0000.00817.45
8.1.100.0000.00717.36
8.1.90.0070.00017.45
8.1.80.0040.00417.42
8.1.70.0000.00717.36
8.1.60.0080.00017.58
8.1.50.0030.00517.52
8.1.40.0090.00017.55
8.1.30.0060.00317.67
8.1.20.0040.00417.62
8.1.10.0000.00717.38
8.1.00.0000.00817.50
8.0.300.0040.00418.77
8.0.290.0060.00316.63
8.0.280.0000.00718.29
8.0.270.0000.00717.13
8.0.260.0020.00518.43
8.0.250.0030.00316.77
8.0.240.0000.00616.84
8.0.230.0000.00716.88
8.0.220.0000.00716.83
8.0.210.0030.00316.77
8.0.200.0030.00316.87
8.0.190.0000.00716.78
8.0.180.0050.00316.74
8.0.170.0080.00016.70
8.0.160.0040.00416.70
8.0.150.0030.00416.73
8.0.140.0000.00716.69
8.0.130.0000.00513.25
8.0.120.0040.00416.71
8.0.110.0000.00816.83
8.0.100.0050.00216.87
8.0.90.0000.00816.69
8.0.80.0140.00316.82
8.0.70.0000.00816.88
8.0.60.0050.00316.69
8.0.50.0050.00216.86
8.0.30.0090.00817.06
8.0.20.0100.01017.40
8.0.10.0070.00016.95
8.0.00.0060.01316.83
7.4.330.0030.00315.55
7.4.320.0000.00616.54
7.4.300.0050.00316.48
7.4.290.0000.00716.61
7.4.280.0000.00816.61
7.4.270.0070.00016.66
7.4.260.0040.00416.49
7.4.250.0030.00516.33
7.4.240.0030.00316.50
7.4.230.0040.00416.69
7.4.220.0040.00416.63
7.4.210.0130.00516.56
7.4.200.0000.00716.40
7.4.160.0030.01316.49
7.4.140.0120.00617.86
7.4.130.0070.01016.29
7.4.120.0100.00916.45
7.4.110.0080.01116.43
7.4.100.0160.00016.48
7.4.90.0100.00616.60
7.4.80.0170.00019.39
7.4.70.0090.01216.66
7.4.60.0130.00916.47
7.4.50.0060.00916.60
7.4.40.0110.01216.59
7.4.00.0090.00314.60
7.3.330.0030.00313.15
7.3.320.0030.00313.29
7.3.310.0030.00316.33
7.3.300.0060.00016.31
7.3.290.0000.00816.17
7.3.280.0140.00016.31
7.3.260.0080.00916.52
7.3.240.0080.01016.56
7.3.230.0090.00616.47
7.3.210.0040.01516.23
7.3.200.0130.00316.45
7.3.190.0040.01316.41
7.3.180.0120.00416.25
7.3.170.0150.00616.43
7.3.160.0070.01016.34
7.3.10.0050.00716.48
7.3.00.0030.00916.48
7.2.330.0140.00416.54
7.2.320.0120.00616.54
7.2.310.0070.01116.70
7.2.300.0030.01416.70
7.2.290.0100.01016.53
7.2.130.0090.00816.98
7.2.120.0030.00916.72
7.2.110.0040.00816.81
7.2.100.0800.01016.04
7.2.90.0850.00816.16
7.2.80.0730.01016.00
7.2.70.0700.00616.14
7.2.60.0730.00816.29
7.2.50.0750.00516.00
7.2.40.0680.00816.06
7.2.30.0080.00916.03
7.2.20.0790.00716.07
7.2.10.0510.00516.14
7.2.00.1110.00616.05
7.1.250.0050.00815.69
7.1.220.2530.01013.78
7.1.210.1870.00313.90
7.1.200.2090.00713.85
7.1.190.2130.00013.57
7.1.180.1850.01013.84
7.1.170.1890.00313.93
7.1.160.2350.00313.84
7.1.150.0120.00913.91
7.1.140.0380.00613.89
7.1.130.3160.00613.96
7.1.120.2750.00613.58
7.1.110.1900.00713.86
7.1.100.3270.01313.77
7.1.90.0160.00613.82
7.1.80.0840.00913.86
7.1.70.3080.00713.57
7.1.60.2370.01031.77
7.1.50.4030.00031.53
7.1.40.2240.01431.65
7.1.30.0300.00431.63
7.1.20.3020.00731.46
7.1.10.0610.01213.84
7.1.00.0370.00413.63
5.6.380.0040.01114.35

preferences:
63.81 ms | 401 KiB | 5 Q