3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait TraitName{ protected $name; abstract protected function setName(); public function __construct(){ $this->setName(); } public function getName(){ return $this->name; } } class MyClass{ use TraitName{ TraitName::__construct as private __traitConstruct; } protected function setName(){ $this->name = __CLASS__; } public function __construct(){ $this->__traitConstruct(); } } $objMyClass = new MyClass(); echo $objMyClass->getName();

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.0120.00316.50
8.3.50.0110.00821.16
8.3.40.0040.01118.67
8.3.30.0140.00018.45
8.3.20.0000.00820.39
8.3.10.0040.00421.77
8.3.00.0040.00421.85
8.2.180.0120.00618.56
8.2.170.0110.00422.96
8.2.160.0100.01020.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0130.00620.84
8.2.110.0050.00519.27
8.2.100.0040.00817.93
8.2.90.0000.00719.23
8.2.80.0030.00517.97
8.2.70.0000.00817.48
8.2.60.0030.00617.80
8.2.50.0000.00818.09
8.2.40.0040.00422.23
8.2.30.0050.00319.35
8.2.20.0040.00417.56
8.2.10.0040.00418.16
8.2.00.0040.00418.12
8.1.280.0090.00925.92
8.1.270.0000.00822.19
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0060.00322.15
8.1.230.0070.00317.70
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0080.00517.35
8.1.190.0030.00617.13
8.1.180.0000.00818.10
8.1.170.0000.00918.35
8.1.160.0040.00420.69
8.1.150.0070.00318.89
8.1.140.0040.00419.59
8.1.130.0000.00717.67
8.1.120.0000.00717.46
8.1.110.0050.00217.35
8.1.100.0040.00417.36
8.1.90.0030.00317.47
8.1.80.0030.00617.46
8.1.70.0080.00017.48
8.1.60.0040.00417.62
8.1.50.0090.00017.53
8.1.40.0040.00417.52
8.1.30.0030.00617.57
8.1.20.0000.00717.62
8.1.10.0060.00317.64
8.1.00.0030.00517.40
8.0.300.0080.00018.77
8.0.290.0040.00416.73
8.0.280.0070.00018.45
8.0.270.0040.00417.17
8.0.260.0030.00317.19
8.0.250.0030.00316.86
8.0.240.0030.00316.97
8.0.230.0000.00716.97
8.0.220.0040.00416.82
8.0.210.0050.00316.89
8.0.200.0000.00716.89
8.0.190.0000.00817.00
8.0.180.0040.00416.94
8.0.170.0040.00416.88
8.0.160.0070.00016.98
8.0.150.0000.00716.81
8.0.140.0000.00716.88
8.0.130.0030.00313.39
8.0.120.0000.00816.77
8.0.110.0040.00416.85
8.0.100.0040.00416.80
8.0.90.0000.00716.88
8.0.80.0080.00816.88
8.0.70.0040.00416.90
8.0.60.0040.00416.92
8.0.50.0050.00216.85
8.0.30.0090.00917.06
8.0.20.0090.01017.40
8.0.10.0090.00017.06
8.0.00.0120.00616.65
7.4.330.0050.00016.69
7.4.320.0030.00316.46
7.4.300.0040.00416.61
7.4.290.0000.01116.55
7.4.280.0070.00016.64
7.4.270.0000.00716.47
7.4.260.0050.00316.60
7.4.250.0040.00416.59
7.4.240.0000.00716.61
7.4.230.0000.00716.69
7.4.220.0110.00716.63
7.4.210.0070.00816.58
7.4.200.0040.00416.63
7.4.160.0060.00816.51
7.4.150.0120.00617.40
7.4.140.0100.00917.86
7.4.130.0080.01016.43
7.4.120.0170.00316.57
7.4.110.0000.01616.38
7.4.100.0100.01016.47
7.4.90.0100.00716.60
7.4.80.0120.00619.39
7.4.70.0080.00816.49
7.4.60.0080.00816.71
7.4.50.0030.01016.41
7.4.40.0100.00716.63
7.4.30.0150.00316.63
7.4.00.0070.00714.89
7.3.330.0020.00213.32
7.3.320.0030.00313.12
7.3.310.0000.00716.30
7.3.300.0030.00316.15
7.3.290.0030.00316.18
7.3.280.0070.01116.24
7.3.270.0060.01117.40
7.3.260.0180.00616.36
7.3.250.0060.01116.40
7.3.240.0100.00716.51
7.3.230.0150.00416.39
7.3.210.0100.00716.30
7.3.200.0120.00919.39
7.3.190.0100.01416.36
7.3.180.0110.00716.63
7.3.170.0090.00916.39
7.3.160.0080.00816.60
7.2.330.0150.00416.79
7.2.320.0090.00916.82
7.2.310.0060.01316.45
7.2.300.0090.00916.59
7.2.290.0070.01016.89
7.2.60.0090.00616.77
7.1.200.0000.00715.34
7.1.100.0100.00618.09
7.1.70.0070.00317.09
7.1.60.0040.00717.29
7.1.50.0100.01016.96
7.1.00.0070.07022.39
7.0.200.0000.00716.47
7.0.60.0170.08021.63
7.0.50.0100.04017.85
7.0.40.0100.06720.13
7.0.30.0300.03020.26
7.0.20.0270.08320.19
7.0.10.0000.07320.24
7.0.00.0070.08720.06
5.6.280.0070.07321.14
5.6.210.0070.08320.77
5.6.200.0000.07018.14
5.6.190.0030.08720.51
5.6.180.0300.06720.41
5.6.170.0300.06720.39
5.6.160.0030.04020.61
5.6.150.0000.05018.13
5.6.140.0130.07718.19
5.6.130.0000.04718.24
5.6.120.0130.07320.90
5.6.110.0070.07321.08
5.6.100.0100.03321.02
5.6.90.0100.08321.01
5.6.80.0130.07320.37
5.5.350.0300.08020.33
5.5.340.0100.04717.96
5.5.330.0100.07720.31
5.5.320.0670.06320.31
5.5.310.0300.07020.50
5.5.300.0070.08018.01
5.5.290.0130.07717.95
5.5.280.0200.06020.85
5.5.270.0170.03720.73
5.5.260.0130.08320.89
5.5.250.0030.04020.62
5.5.240.0170.03020.19

preferences:
54.02 ms | 401 KiB | 5 Q