3v4l.org

run code in 300+ PHP versions simultaneously
<?php class UserController { public function getUser($name): User { if(! $user = $this->repo->findByName($name)){ throw UserNotCreatedYetException; } } public function register(Request $req) { try { $user = $this->getUser($name); } catch(UserNotCreatedYetException $e) { $user = new User( $req->get('username') ); } } }

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.60.0090.00918.43
8.3.50.0110.00418.32
8.3.40.0110.00718.62
8.3.30.0060.01218.59
8.3.20.0040.00421.73
8.3.10.0040.00423.48
8.3.00.0040.00421.14
8.2.180.0040.01116.48
8.2.170.0140.00022.96
8.2.160.0170.00020.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00020.32
8.2.120.0050.00326.35
8.2.110.0040.00722.09
8.2.100.0040.00719.45
8.2.90.0040.00417.63
8.2.80.0000.00818.51
8.2.70.0000.00817.68
8.2.60.0000.00817.50
8.2.50.0000.00818.10
8.2.40.0060.00322.17
8.2.30.0040.00419.29
8.2.20.0040.00417.80
8.2.10.0050.00317.66
8.2.00.0070.00017.98
8.1.280.0120.00325.92
8.1.270.0070.00023.91
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0040.00422.07
8.1.230.0060.00917.76
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0040.00417.10
8.1.190.0030.00617.23
8.1.180.0040.00418.10
8.1.170.0030.00618.59
8.1.160.0050.00318.69
8.1.150.0000.00720.16
8.1.140.0000.00817.58
8.1.130.0000.00618.94
8.1.120.0040.00417.21
8.1.110.0040.00417.37
8.1.100.0000.00817.37
8.1.90.0000.01017.30
8.1.80.0080.00017.32
8.1.70.0000.00717.29
8.1.60.0000.00817.41
8.1.50.0080.00017.32
8.1.40.0040.00417.30
8.1.30.0050.00317.43
8.1.20.0060.00317.45
8.1.10.0000.00817.32
8.1.00.0060.00317.20
8.0.300.0090.00018.77
8.0.290.0060.00316.58
8.0.280.0000.00718.32
8.0.270.0070.00017.14
8.0.260.0040.00416.68
8.0.250.0000.00716.86
8.0.240.0000.00716.83
8.0.230.0030.00616.79
8.0.220.0070.00016.76
8.0.210.0040.00416.67
8.0.200.0060.00016.84
8.0.190.0040.00416.84
8.0.180.0000.00816.79
8.0.170.0030.00516.75
8.0.160.0040.00416.84
8.0.150.0000.00716.68
8.0.140.0000.00716.68
8.0.130.0030.00313.14
8.0.120.0050.00316.72
8.0.110.0040.00416.68
8.0.100.0040.00416.76
8.0.90.0040.00416.56
8.0.80.0150.00616.73
8.0.70.0050.00216.55
8.0.60.0050.00316.85
8.0.50.0000.00816.55
8.0.30.0090.01216.96
8.0.20.0120.00617.40
8.0.10.0040.00416.88
8.0.00.0070.01516.75
7.4.330.0000.00615.55
7.4.320.0030.00316.52
7.4.300.0000.00616.47
7.4.290.0000.00816.37
7.4.280.0040.00416.37
7.4.270.0000.00716.29
7.4.260.0060.00316.44
7.4.250.0030.00616.34
7.4.240.0030.00616.39
7.4.230.0070.00016.55
7.4.220.0000.00916.17
7.4.210.0070.01416.38
7.4.200.0050.00316.47
7.4.160.0040.01116.38
7.4.140.0100.01117.86
7.4.130.0130.01016.45
7.4.120.0110.00716.34
7.4.110.0070.01016.47
7.4.100.0120.01216.33
7.4.90.0140.00316.45
7.4.80.0170.00419.39
7.4.70.0110.01116.37
7.4.60.0110.00716.34
7.4.50.0100.00316.21
7.4.40.0060.01016.27
7.4.00.0100.00714.87
7.3.330.0030.00313.13
7.3.320.0060.00013.18
7.3.310.0000.00716.25
7.3.300.0000.00716.04
7.3.290.0060.00816.15
7.3.280.0090.00716.13
7.3.260.0120.00616.17
7.3.250.0100.00816.29
7.3.240.0110.00616.29
7.3.230.0080.01116.43
7.3.210.0120.00616.22
7.3.200.0060.01016.23
7.3.190.0030.01316.45
7.3.180.0090.00616.46
7.3.170.0190.00316.43
7.3.160.0120.00316.17
7.2.330.0040.01316.52
7.2.320.0120.01116.45
7.2.310.0140.00416.28
7.2.300.0130.00316.19
7.2.290.0120.01216.52
7.2.110.0070.00716.21
7.2.60.0160.01016.69
7.2.30.0160.01117.59
7.2.20.0160.01317.69
7.2.10.0090.01517.77
7.2.00.0130.01217.63
7.1.200.0110.00415.49
7.1.150.0140.01216.28
7.1.140.0110.01316.41
7.1.130.0100.01216.44
7.1.120.0140.00616.40
7.1.110.0110.00915.82
7.1.100.0160.01015.91
7.1.90.0130.00915.81
7.1.80.0080.01116.07
7.1.70.0110.01415.05
7.1.60.0370.01633.30
7.1.50.0740.01332.92
7.1.40.0300.01532.63
7.1.30.0380.01832.49
7.1.20.0230.01732.70
7.1.10.0080.01014.51
7.1.00.0110.01414.59

preferences:
71.97 ms | 401 KiB | 5 Q