3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Fluent interface marker */ interface FluentInterface { } interface Around{} interface Aspect{} //use Go\Aop\Intercept\MethodInvocation; class FluentInterfaceAspect implements Aspect { /** * Fluent interface advice * * @Around("within(FluentInterface+) && execution(public **->set*(*))") * * @param MethodInvocation $invocation * @return mixed|null|object */ protected function aroundMethodExecution(MethodInvocation $invocation) { $result = $invocation->proceed(); return $result!==null ? $result : $invocation->getThis(); } } class User implements FluentInterface { protected $name; protected $surname; protected $password; public function setName($name) { $this->name = $name; } public function setSurname($surname) { $this->surname = $surname; } public function setPassword($password) { if (!$password) { throw new InvalidArgumentException("Password shouldn't be empty"); } $this->password = $password; } } $user = new User; $user->setName('John')->setSurname('Doe')->setPassword('root');

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.0110.00416.50
8.3.50.0150.00917.74
8.3.40.0100.00718.96
8.3.30.0120.00318.66
8.3.20.0040.00418.89
8.3.10.0050.00318.89
8.3.00.0060.00319.63
8.2.180.0130.00616.50
8.2.170.0110.01122.96
8.2.160.0050.00820.35
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0050.00320.84
8.2.110.0060.00320.52
8.2.100.0040.00817.72
8.2.90.0030.00518.03
8.2.80.0070.00020.57
8.2.70.0040.00417.93
8.2.60.0080.00017.93
8.2.50.0030.00618.10
8.2.40.0070.00020.59
8.2.30.0020.00920.63
8.2.20.0090.00017.61
8.2.10.0040.00417.80
8.2.00.0040.00417.72
8.1.280.0070.01425.92
8.1.270.0000.00724.66
8.1.260.0080.00026.35
8.1.250.0100.00328.09
8.1.240.0060.00323.97
8.1.230.0060.00620.85
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0000.00917.48
8.1.190.0000.00719.10
8.1.180.0030.00618.10
8.1.170.0060.00418.65
8.1.160.0080.00022.03
8.1.150.0050.00218.66
8.1.140.0020.00517.40
8.1.130.0000.00717.89
8.1.120.0030.00517.37
8.1.110.0000.00717.49
8.1.100.0000.00717.49
8.1.90.0000.00817.36
8.1.80.0000.00717.37
8.1.70.0050.00317.40
8.1.60.0090.00017.45
8.1.50.0090.00017.49
8.1.40.0040.00417.43
8.1.30.0080.00017.70
8.1.20.0070.00017.66
8.1.10.0000.00817.63
8.1.00.0030.00617.55
8.0.300.0000.00722.00
8.0.290.0040.00416.75
8.0.280.0000.00718.49
8.0.270.0030.00317.23
8.0.260.0040.00416.89
8.0.250.0060.00317.07
8.0.240.0030.00317.02
8.0.230.0030.00316.93
8.0.220.0070.00016.94
8.0.210.0000.00717.03
8.0.200.0040.00416.89
8.0.190.0070.00416.99
8.0.180.0040.00417.02
8.0.170.0030.00516.96
8.0.160.0000.00716.84
8.0.150.0000.00916.87
8.0.140.0080.00016.91
8.0.130.0060.00013.41
8.0.120.0040.00416.96
8.0.110.0060.00316.96
8.0.100.0030.00316.93
8.0.90.0080.00017.04
8.0.80.0060.01016.96
8.0.70.0050.00316.95
8.0.60.0040.00416.78
8.0.50.0000.00717.04
8.0.30.0100.01017.33
8.0.20.0120.00817.09
8.0.10.0040.00416.94
8.0.00.0060.01116.79
7.4.330.0050.00012.86
7.4.320.0000.00616.51
7.4.300.0030.00316.64
7.4.290.0100.00016.50
7.4.280.0000.00716.59
7.4.270.0030.00316.47
7.4.260.0000.00513.27
7.4.250.0060.00316.55
7.4.240.0020.00516.58
7.4.230.0030.00316.37
7.4.220.0120.00716.55
7.4.210.0090.00516.62
7.4.200.0030.00316.40
7.4.190.0080.00016.77
7.4.160.0130.00316.32
7.4.150.0060.01316.33
7.4.140.0140.00816.70
7.4.130.0140.00616.60
7.4.120.0120.00516.50
7.4.110.0130.00316.46
7.4.100.0070.01016.66
7.4.90.0110.00616.59
7.4.80.0120.00919.39
7.4.70.0080.00816.59
7.4.60.0130.00316.56
7.4.50.0030.00916.59
7.4.40.0150.00316.46
7.4.30.0130.00316.63
7.4.00.0080.00815.05
7.3.330.0000.00713.40
7.3.320.0000.00513.34
7.3.310.0030.00316.36
7.3.300.0030.00316.37
7.3.290.0070.01016.31
7.3.280.0080.01016.37
7.3.270.0120.00416.36
7.3.260.0080.01716.56
7.3.250.0110.00916.44
7.3.240.0090.00916.57
7.3.230.0070.01016.39
7.3.210.0060.01016.46
7.3.200.0040.01816.45
7.3.190.0070.01116.56
7.3.180.0100.00716.43
7.3.170.0090.01216.41
7.3.160.0030.01716.38
7.3.120.0050.01314.92
7.3.110.0060.00914.86
7.3.100.0090.00614.55
7.3.90.0000.01514.87
7.3.80.0060.00614.75
7.3.70.0090.00614.89
7.3.60.0060.01014.54
7.3.50.0120.00314.70
7.3.40.0140.00014.73
7.3.30.0030.01414.85
7.3.20.0070.01016.55
7.3.10.0040.01216.57
7.3.00.0100.00616.35
7.2.330.0090.01316.38
7.2.320.0130.00316.83
7.2.310.0050.01416.64
7.2.300.0130.00316.63
7.2.290.0060.00916.65
7.2.250.0060.00615.04
7.2.240.0060.01015.03
7.2.230.0120.00314.83
7.2.220.0070.00714.95
7.2.210.0100.00315.21
7.2.200.0060.00915.11
7.2.190.0030.01315.23
7.2.180.0070.01114.89
7.2.170.0090.00914.96
7.2.60.0000.01617.04
7.2.00.0000.01519.46
7.1.330.0080.00415.79
7.1.320.0080.00815.83
7.1.310.0000.01515.98
7.1.300.0060.00615.71
7.1.290.0090.00615.65
7.1.280.0060.00915.73
7.1.270.0040.01115.75
7.1.260.0040.01215.75
7.1.200.0040.01115.69
7.1.100.0230.00316.46
7.1.70.0030.00617.21
7.1.60.0090.01619.40
7.1.50.0130.01016.52
7.1.00.0070.07022.40
7.0.200.0040.00416.79
7.0.140.0070.07022.02
7.0.120.0030.03322.16
7.0.60.0030.06719.88
7.0.50.0030.04018.00
7.0.40.0270.04020.30
7.0.30.0270.05020.02
7.0.20.0400.07020.23
7.0.10.0330.07320.25
7.0.00.0230.04720.10
5.6.280.0100.06721.08
5.6.210.0070.03720.63
5.6.200.0070.03718.16
5.6.190.0300.05720.34
5.6.180.0330.05020.39
5.6.170.0330.07320.75
5.6.160.0270.04020.49
5.6.150.0270.04320.41
5.6.140.0400.07020.50
5.6.130.0230.04720.50
5.6.120.0330.07720.41
5.6.110.0270.08020.16
5.6.100.0400.07320.52
5.6.90.0300.07020.48
5.6.80.0230.04319.80
5.6.70.0330.06719.71
5.6.60.0270.04319.55
5.6.50.0330.04319.56
5.6.40.0270.06019.88
5.6.30.0300.08019.73
5.6.20.0300.07319.86
5.6.10.0700.05019.88
5.6.00.0330.07019.53
5.5.350.0200.07320.39
5.5.340.0100.07717.95
5.5.330.0270.04320.13
5.5.320.0270.07720.47
5.5.310.0300.08020.27
5.5.300.0330.04020.30
5.5.290.0270.04320.17
5.5.280.0270.07320.12
5.5.270.0300.07020.20
5.5.260.0300.07319.98
5.5.250.0330.07019.95
5.5.240.0300.03719.69
5.5.230.0230.04719.39
5.5.220.0230.04319.61
5.5.210.0230.06319.68
5.5.200.0330.04319.32
5.5.190.0300.07319.47
5.5.180.0330.06019.55
5.5.160.0230.05719.60
5.5.150.0330.07019.52
5.5.140.0300.07719.55
5.5.130.0270.06319.32
5.5.120.0370.06019.58
5.5.110.0300.07319.48
5.5.100.0370.07019.39
5.5.90.0400.06319.46
5.5.80.0500.04319.55
5.5.70.0330.05719.45
5.5.60.0330.07019.21
5.5.50.0270.07719.48
5.5.40.0370.07019.43
5.5.30.0330.07019.37
5.5.20.0270.03719.44
5.5.10.0370.06319.54
5.5.00.0230.04019.37
5.4.450.0300.07319.48
5.4.440.0330.06319.48
5.4.430.0230.08019.20
5.4.420.0370.06319.56
5.4.410.0330.05719.20
5.4.400.0200.04019.25
5.4.390.0330.05018.85
5.4.380.0230.03719.15
5.4.370.0330.04019.12
5.4.360.0230.04319.08
5.4.350.0370.04319.08
5.4.340.0370.06319.15
5.4.320.0370.07019.17
5.4.310.0330.06719.08
5.4.300.0630.05019.14
5.4.290.0370.06018.85
5.4.280.0300.04319.25
5.4.270.0330.06018.93
5.4.260.0400.06719.16
5.4.250.0370.06018.85
5.4.240.0300.07319.07
5.4.230.0370.05319.14
5.4.220.0300.04718.84
5.4.210.0230.04019.24
5.4.200.0330.06018.87
5.4.190.0230.04719.20
5.4.180.0270.07719.16
5.4.170.0270.07019.27
5.4.160.0300.05019.10
5.4.150.0300.07019.23
5.4.140.0400.05316.55
5.4.130.0270.05716.59
5.4.120.0230.05016.45
5.4.110.0330.06316.47
5.4.100.0300.06016.54
5.4.90.0300.05716.72
5.4.80.0270.06016.47
5.4.70.0400.05316.46
5.4.60.0370.05716.40
5.4.50.0330.06316.36
5.4.40.0300.05716.39
5.4.30.0330.06716.64
5.4.20.0230.03316.26
5.4.10.0300.05316.36
5.4.00.0400.06315.84
5.3.290.0300.06314.82
5.3.280.0230.05314.62
5.3.270.0230.04714.61
5.3.260.0400.06314.67
5.3.250.0270.04014.69
5.3.240.0330.03714.69
5.3.230.0300.07714.64
5.3.220.0200.04014.57
5.3.210.0330.07014.61
5.3.200.0430.06014.60
5.3.190.0270.04314.59
5.3.180.0400.06014.57
5.3.170.0270.04714.59
5.3.160.0270.07314.73
5.3.150.0270.05714.63
5.3.140.0270.06314.60
5.3.130.0270.06714.63
5.3.120.0270.04014.57
5.3.110.0230.05314.61
5.3.100.0230.06014.07
5.3.90.0130.04314.04
5.3.80.0270.02714.18
5.3.70.0230.03314.06
5.3.60.0200.03713.90
5.3.50.0170.04714.02
5.3.40.0270.07014.12
5.3.30.0230.07013.98
5.3.20.0200.04013.75
5.3.10.0300.04013.71
5.3.00.0230.07713.64
5.2.170.0200.03312.52
5.2.160.0170.03712.52
5.2.150.0230.04712.52
5.2.140.0270.05312.52
5.2.130.0170.03312.52
5.2.120.0270.04012.52
5.2.110.0200.03712.52
5.2.100.0300.03712.52
5.2.90.0270.04012.52
5.2.80.0230.05712.52
5.2.70.0270.05012.52
5.2.60.0300.05712.52
5.2.50.0230.04712.52
5.2.40.0200.02712.52
5.2.30.0200.02312.52
5.2.20.0130.04712.52
5.2.10.0170.04312.52
5.2.00.0230.03012.52
5.1.60.0270.04312.52
5.1.50.0170.03312.52
5.1.40.0230.03312.52
5.1.30.0200.04012.52
5.1.20.0200.05712.52
5.1.10.0270.02712.52
5.1.00.0230.03712.52
5.0.50.0100.05012.52
5.0.40.0100.04312.52
5.0.30.0100.06312.52
5.0.20.0170.02012.52
5.0.10.0070.02712.52
5.0.00.0170.04012.52
4.4.90.0100.01712.52
4.4.80.0130.03012.52
4.4.70.0100.04012.52
4.4.60.0130.03012.52
4.4.50.0130.01712.52
4.4.40.0130.05012.52
4.4.30.0130.02012.52
4.4.20.0100.03312.52
4.4.10.0130.03012.52
4.4.00.0200.04012.52
4.3.110.0070.02712.52
4.3.100.0200.02712.52
4.3.90.0170.01712.52
4.3.80.0170.05012.52
4.3.70.0130.02712.52
4.3.60.0130.02712.52
4.3.50.0130.03312.52
4.3.40.0070.04312.52
4.3.30.0100.03312.52
4.3.20.0070.03712.52
4.3.10.0070.02012.52
4.3.00.0070.03012.52

preferences:
46.66 ms | 400 KiB | 5 Q