3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); namespace Domain\Mixins { trait ContentAware { protected string $content; public function getContent() { return $this->content; } public function setContent(string $content) { $this->content = $content; } } use Domain\user\User; trait UserAware { protected User $author; public function getAuthor() { return $this->author; } public function setAuthor(User $author) { $this->author = $author; } } } namespace Domain\User { class User { public function __construct(public string $name){} } } namespace Domain\Forum { use Domain\Mixins; class Message { use Mixins\ContentAware, Mixins\UserAware; } } namespace { use Domain\Forum\Message; use Domain\User\User; $message = new Message; $message->setContent('Hello'); $message->setAuthor(new User('greg')); echo sprintf('%s %s', $message->getContent(), $message->getAuthor()->name); }

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.10.0080.00017.58
8.3.140.0030.00617.36
8.3.130.0120.00016.45
8.3.120.0110.01417.71
8.3.110.0180.01318.82
8.3.100.0210.00931.79
8.3.90.0250.00321.69
8.3.80.0150.00416.55
8.3.70.0160.00917.46
8.3.60.0240.00921.20
8.3.50.0160.00617.38
8.3.40.0090.00718.11
8.3.30.0090.00718.24
8.3.20.0140.00722.64
8.3.10.0120.00522.83
8.3.00.0080.00822.44
8.2.260.0060.00316.61
8.2.250.0060.00318.40
8.2.240.0150.00616.70
8.2.230.0200.00319.38
8.2.220.0070.00827.87
8.2.210.0200.00321.72
8.2.200.0210.00516.53
8.2.190.0230.00817.41
8.2.180.0180.00821.01
8.2.170.0230.00518.36
8.2.160.0200.01020.40
8.2.150.0140.00822.37
8.2.140.0120.00922.39
8.2.130.0160.00722.82
8.2.120.0190.00621.29
8.2.110.0130.00720.84
8.2.100.0120.01120.43
8.2.90.0110.00920.73
8.2.80.0160.00620.56
8.2.70.0110.00640.11
8.2.60.0160.00420.41
8.2.50.0150.00620.51
8.2.40.0130.00821.12
8.2.30.0110.00520.72
8.2.20.0090.00820.35
8.2.10.0110.00520.68
8.2.00.0070.00520.16
8.1.300.0110.00317.17
8.1.290.0070.00717.46
8.1.280.0140.00621.01
8.1.270.0100.00922.70
8.1.260.0120.00623.28
8.1.250.0150.00523.74
8.1.240.0100.01021.35
8.1.230.0160.00420.26
8.1.220.0130.00720.31
8.1.210.0110.00920.52
8.1.200.0150.00520.20
8.1.190.0130.00720.09
8.1.180.0100.00820.33
8.1.170.0140.00320.52
8.1.160.0100.00820.52
8.1.150.0140.00620.11
8.1.140.0130.00619.65
8.1.130.0080.00819.54
8.1.120.0100.00519.16
8.1.110.0130.00519.11
8.1.100.0100.00719.13
8.1.90.0140.00319.13
8.1.80.0070.00819.09
8.1.70.0090.00618.52
8.1.60.0080.00618.40
8.1.50.0150.00318.61
8.1.40.0110.00618.25
8.1.30.0140.00618.44
8.1.20.0120.00518.23
8.1.10.0140.00618.44
8.1.00.0130.00718.36
8.0.300.0150.00519.73
8.0.290.0150.00919.17
8.0.280.0200.00419.55
8.0.270.0110.00619.23
8.0.260.0100.00619.05
8.0.250.0130.00518.72
8.0.240.0130.00618.77
8.0.230.0120.00618.66
8.0.220.0110.00718.62
8.0.210.0170.00618.64
8.0.200.0090.00718.28
8.0.190.0130.00518.43
8.0.180.0120.00518.08
8.0.170.0150.00617.97
8.0.160.0140.00418.00
8.0.150.0140.00718.02
8.0.140.0140.00617.84
8.0.130.0150.00417.49
8.0.120.0140.00417.47
8.0.110.0110.00517.43
8.0.100.0130.00417.57
8.0.90.0110.00617.41
8.0.80.0110.00517.41
8.0.70.0100.00417.37
8.0.60.0110.00617.40
8.0.50.0120.00617.41
8.0.30.0120.00617.38
8.0.20.0120.00517.44
8.0.10.0150.00517.47
8.0.00.0100.00517.62
7.4.330.0170.00617.47
7.4.320.0170.00618.18
7.4.300.0120.00517.61
7.4.290.0150.00717.72
7.4.280.0170.00517.44
7.4.270.0150.00517.33
7.4.260.0180.00517.03
7.4.250.0160.00616.99
7.4.240.0140.00516.94
7.4.230.0150.00517.01
7.4.220.0130.00516.98
7.4.210.0140.00416.93
7.4.200.0120.00616.96
7.4.190.0120.00617.03
7.4.180.0120.00716.94
7.4.160.0150.00516.93
7.4.150.0130.00616.86
7.4.140.0130.00616.86
7.4.130.0130.00516.78
7.4.120.0150.00416.75
7.4.110.0150.00416.78
7.4.100.0130.00616.92
7.4.90.0120.00716.77
7.4.80.0140.00616.74
7.4.70.0130.00616.80
7.4.60.0130.00516.81
7.4.50.0130.00616.65
7.4.40.0150.00516.73
7.4.30.0140.00516.78
7.4.20.0130.00416.79
7.4.10.0130.00416.77
7.4.00.0110.00616.76
7.3.330.0150.00417.14
7.3.320.0150.00416.57
7.3.310.0140.00516.73
7.3.300.0140.00516.84
7.3.290.0140.00516.72
7.3.280.0140.00416.70
7.3.270.0150.00516.72
7.3.260.0150.00616.72
7.3.250.0150.00716.71
7.3.240.0140.00716.75
7.3.230.0150.00616.73
7.3.220.0160.00616.64
7.3.210.0170.00616.67
7.3.200.0160.00516.66
7.3.190.0160.00516.66
7.3.180.0140.00616.71
7.3.170.0150.00416.73
7.3.160.0140.00616.64
7.3.150.0160.00616.66
7.3.140.0170.00416.66
7.3.130.0160.00516.63
7.3.120.0140.00516.59
7.3.110.0150.00416.62
7.3.100.0150.00416.61
7.3.90.0150.00416.93
7.3.80.0140.00616.67
7.3.70.0150.00516.75
7.3.60.0130.00616.79
7.3.50.0150.00516.74
7.3.40.0140.00516.75
7.3.30.0140.00616.76
7.3.20.0170.00417.46
7.3.10.0170.00517.43
7.3.00.0200.00417.51

preferences:
51.75 ms | 403 KiB | 5 Q