3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Error { private $_errors; private function _init(){ $this->_errors = (object) [ 'small' => 'Small mistake' ]; } public function getError(){ var_dump($this->_errors); } } class Test { use Error; public function __construct(){ $this->_errors = $this->_init(); } } $obj = new Test(); $obj->getError();

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.39
8.3.50.0120.00918.05
8.3.40.0100.01018.66
8.3.30.0060.00818.68
8.3.20.0070.00720.34
8.3.10.0060.01221.73
8.3.00.0070.00023.61
8.2.180.0180.00418.41
8.2.170.0130.00722.96
8.2.160.0100.00321.02
8.2.150.0040.00424.18
8.2.140.0110.00424.66
8.2.130.0110.00322.16
8.2.120.0000.00926.35
8.2.110.0070.00321.12
8.2.100.0040.00818.03
8.2.90.0000.00819.05
8.2.80.0080.00018.04
8.2.70.0030.00617.38
8.2.60.0000.00817.92
8.2.50.0040.00418.10
8.2.40.0000.00822.33
8.2.30.0050.00319.19
8.2.20.0040.00418.05
8.2.10.0030.00518.21
8.2.00.0050.00318.05
8.1.280.0080.00825.92
8.1.270.0040.00420.54
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0060.00324.02
8.1.230.0080.00418.82
8.1.220.0080.00017.74
8.1.210.0030.00518.77
8.1.200.0030.00617.23
8.1.190.0030.00617.39
8.1.180.0040.00418.10
8.1.170.0000.00721.98
8.1.160.0050.00218.84
8.1.150.0000.00721.92
8.1.140.0000.00719.45
8.1.130.0000.00718.95
8.1.120.0060.00317.31
8.1.110.0030.00617.44
8.1.100.0030.00517.28
8.1.90.0000.00817.46
8.1.80.0030.00517.42
8.1.70.0000.00817.36
8.1.60.0000.00917.57
8.1.50.0000.00817.50
8.1.40.0090.00017.41
8.1.30.0000.00817.55
8.1.20.0080.00317.49
8.1.10.0040.00417.33
8.1.00.0040.00417.33
8.0.300.0050.00318.77
8.0.290.0040.00416.63
8.0.280.0000.00718.29
8.0.270.0030.00317.05
8.0.260.0000.00618.31
8.0.250.0080.00016.93
8.0.240.0030.00616.93
8.0.230.0030.00316.89
8.0.220.0000.00716.88
8.0.210.0030.00316.93
8.0.200.0000.00716.83
8.0.190.0000.00816.93
8.0.180.0000.00716.93
8.0.170.0030.00316.87
8.0.160.0000.00716.78
8.0.150.0030.00716.88
8.0.140.0000.00716.88
8.0.130.0000.00513.20
8.0.120.0000.00816.84
8.0.110.0000.00816.91
8.0.100.0070.00016.99
8.0.90.0040.00416.80
8.0.80.0040.01116.93
8.0.70.0050.00316.79
8.0.60.0040.00416.83
8.0.50.0000.00816.75
8.0.30.0070.01116.95
8.0.20.0070.01117.40
8.0.10.0040.00417.03
8.0.00.0090.00916.65
7.4.330.0060.00015.55
7.4.320.0000.00716.45
7.4.300.0000.00616.52
7.4.290.0040.00816.37
7.4.280.0050.00316.43
7.4.270.0000.00716.49
7.4.260.0090.00016.51
7.4.250.0050.00216.30
7.4.240.0030.00316.51
7.4.230.0000.00716.43
7.4.220.0070.01416.56
7.4.210.0120.00816.54
7.4.200.0070.00016.42
7.4.160.0090.00716.58
7.4.150.0060.01317.40
7.4.140.0110.00817.86
7.4.130.0100.00816.37
7.4.120.0090.01116.43
7.4.110.0000.01816.41
7.4.100.0100.00716.41
7.4.90.0110.00616.50
7.4.80.0130.01019.39
7.4.70.0070.01016.37
7.4.60.0160.00016.49
7.4.50.0000.01016.52
7.4.40.0030.01316.46
7.4.30.0040.01116.61
7.4.00.0040.01415.12
7.3.330.0030.00313.23
7.3.320.0030.00312.99
7.3.310.0060.00016.19
7.3.300.0030.00316.20
7.3.290.0090.00716.19
7.3.280.0090.01016.23
7.3.270.0080.00817.40
7.3.260.0120.01016.30
7.3.250.0150.00216.24
7.3.240.0100.00716.30
7.3.230.0140.00316.57
7.3.210.0100.00716.18
7.3.200.0030.01316.31
7.3.190.0030.01316.36
7.3.180.0040.01116.36
7.3.170.0000.01616.37
7.3.160.0120.00916.58
7.2.330.0090.00916.34
7.2.320.0000.01616.43
7.2.310.0060.01016.60
7.2.300.0090.00916.54
7.2.290.0120.00616.42
7.2.110.0140.00716.33
7.2.80.0090.00616.46
7.2.60.0030.01416.96
7.2.00.0040.00419.29
7.1.200.0060.00915.57
7.1.70.0050.00316.75
7.1.60.0000.01117.16
7.1.50.0150.00616.80
7.1.40.2230.01732.13
7.1.30.2070.01732.40
7.1.20.4030.02332.61
7.1.10.2630.01014.49
7.1.00.2600.01714.71
7.0.200.0030.01316.82
7.0.180.1430.00714.12
7.0.170.2100.01714.08
7.0.160.3070.01014.34
7.0.150.3030.00714.13
7.0.140.3230.01714.19
7.0.130.2700.01314.24
7.0.120.2230.00714.40
7.0.110.3000.01314.31
7.0.100.2600.01014.22
7.0.90.2530.01014.43
7.0.80.1970.01014.23
7.0.70.1800.00714.19
7.0.60.1970.01314.16
7.0.50.2470.00314.40
7.0.40.2570.00714.53
7.0.30.2530.00714.61
7.0.20.3300.01314.55
7.0.10.2670.01014.46
7.0.00.2430.01014.35

preferences:
55.69 ms | 401 KiB | 5 Q