3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test\Config { trait Base { public $config = []; function __construct($config = []) { echo 'Constructor'; $this->config = $config; } } } namespace TestB { class Config { use \Test\Config\Base; } } namespace { $test = new TestB\Config(['foo' => 'bar']); echo isset($test->config['foo']) ? 'Success: foo is set' : 'Error: foo is not set'; }

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.0130.00718.43
8.3.50.0120.00318.27
8.3.40.0100.00618.81
8.3.30.0090.00618.66
8.3.20.0060.00321.03
8.3.10.0040.00423.53
8.3.00.0030.00523.59
8.2.180.0140.00718.41
8.2.170.0140.00322.96
8.2.160.0100.00321.95
8.2.150.0000.00825.66
8.2.140.0000.00924.66
8.2.130.0080.00020.43
8.2.120.0040.00426.35
8.2.110.0030.00620.36
8.2.100.0120.00017.84
8.2.90.0030.00719.32
8.2.80.0040.00417.97
8.2.70.0080.00017.50
8.2.60.0040.00418.05
8.2.50.0000.00818.07
8.2.40.0030.00518.16
8.2.30.0020.00518.00
8.2.20.0000.00718.13
8.2.10.0040.00419.30
8.2.00.0000.00719.39
8.1.270.0040.00424.66
8.1.260.0100.00026.35
8.1.250.0050.00228.09
8.1.240.0060.00323.96
8.1.230.0070.00417.77
8.1.220.0000.00817.78
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0000.00818.66
8.1.160.0000.00818.80
8.1.150.0000.00718.84
8.1.140.0000.00722.09
8.1.130.0000.00720.13
8.1.120.0000.00917.52
8.1.110.0050.00317.45
8.1.100.0040.00417.51
8.1.90.0000.00717.40
8.1.80.0000.00717.46
8.1.70.0090.00317.38
8.1.60.0040.00417.57
8.1.50.0000.00817.48
8.1.40.0000.00817.48
8.1.30.0050.00517.60
8.1.20.0050.00317.55
8.1.10.0030.00517.45
8.1.00.0020.00517.36
8.0.300.0000.00719.84
8.0.290.0000.00716.63
8.0.280.0000.00718.35
8.0.270.0050.00317.26
8.0.260.0060.00018.48
8.0.250.0000.00716.83
8.0.240.0040.00416.86
8.0.230.0070.00016.83
8.0.220.0040.00416.93
8.0.210.0000.00816.83
8.0.200.0030.00316.93
8.0.190.0040.00416.84
8.0.180.0070.00016.82
8.0.170.0030.00516.89
8.0.160.0040.00416.84
8.0.150.0100.00016.74
8.0.140.0000.00816.83
8.0.130.0000.00613.27
8.0.120.0040.00416.88
8.0.110.0030.00616.87
8.0.100.0070.00016.88
8.0.90.0000.00816.75
8.0.80.0130.00916.87
8.0.70.0000.00716.86
8.0.60.0000.00716.84
8.0.50.0000.00816.85
8.0.30.0140.01016.92
8.0.20.0070.01117.40
8.0.10.0040.00416.89
8.0.00.0090.00916.63
7.4.330.0050.00016.83
7.4.320.0030.00316.59
7.4.300.0060.00016.38
7.4.290.0080.00016.48
7.4.280.0050.00316.45
7.4.270.0000.00716.58
7.4.260.0060.00316.37
7.4.250.0000.00716.47
7.4.240.0000.00716.52
7.4.230.0070.00016.70
7.4.220.0080.00016.34
7.4.210.0090.00616.56
7.4.200.0070.00016.33
7.4.160.0080.00816.43
7.4.140.0140.00617.86
7.4.130.0090.00916.32
7.4.120.0160.00316.37
7.4.110.0130.01016.39
7.4.100.0060.01616.58
7.4.90.0070.01016.51
7.4.80.0140.00319.39
7.4.70.0090.00916.58
7.4.60.0120.00416.45
7.4.50.0030.01216.46
7.4.40.0100.00716.49
7.4.00.0060.00914.95
7.3.330.0050.00013.21
7.3.320.0030.00313.27
7.3.310.0070.00016.10
7.3.300.0030.00416.20
7.3.290.0000.00716.16
7.3.280.0140.00916.19
7.3.260.0070.01116.46
7.3.240.0080.01316.40
7.3.230.0120.00616.37
7.3.210.0060.01016.37
7.3.200.0080.00816.56
7.3.190.0110.00616.34
7.3.180.0060.01516.50
7.3.170.0050.01216.33
7.3.160.0110.00616.23
7.3.120.0070.00914.88
7.3.110.0090.00914.78
7.3.100.0050.01114.69
7.3.90.0050.01014.74
7.3.80.0050.00914.85
7.3.70.0060.00614.68
7.3.60.0040.00614.59
7.3.50.0060.01014.85
7.3.40.0070.00714.76
7.3.30.0030.00914.49
7.3.20.0030.01016.45
7.3.10.0140.00416.45
7.3.00.0240.00815.85
7.2.330.0090.00916.74
7.2.320.0090.00716.69
7.2.310.0030.01416.25
7.2.300.0040.01216.80
7.2.290.0030.01416.73
7.2.250.0080.00815.04
7.2.240.0080.01115.02
7.2.230.0060.00815.12
7.2.220.0030.00914.96
7.2.210.0090.00515.18
7.2.200.0050.00814.99
7.2.190.0050.01215.04
7.2.180.0040.00815.06
7.2.170.0090.00914.93
7.2.160.0060.00315.02
7.2.150.0150.00316.88
7.2.140.0070.00317.04
7.2.130.0270.01116.09
7.2.120.0300.00515.82
7.2.110.0250.00816.18
7.2.100.0150.01116.14
7.2.90.0140.01216.18
7.2.80.0230.00516.07
7.2.70.0220.00716.00
7.2.60.0210.01016.16
7.2.50.0220.00716.18
7.2.40.0170.00816.16
7.2.30.0240.00616.25
7.2.20.0180.01015.87
7.2.10.0290.00516.09
7.2.00.0220.00616.18
7.1.330.0050.01015.76
7.1.320.0030.00715.69
7.1.310.0030.00815.71
7.1.300.0110.00115.60
7.1.290.0030.01115.57
7.1.280.0030.00715.72
7.1.270.0090.00515.70
7.1.260.0040.00815.77
7.1.250.0300.00614.94
7.1.240.0030.01015.96
7.1.230.0080.00415.46
7.1.220.0070.01015.63
7.1.210.0060.00315.42
7.1.200.0030.01015.66
7.1.190.0120.00315.88
7.1.180.0100.00315.89
7.1.170.0030.00815.91
7.1.160.0100.00315.93
7.1.150.0030.01015.41
7.1.140.0050.00515.73
7.1.130.0080.00415.65
7.1.120.0060.00615.77
7.1.110.0120.00015.66
7.1.100.0030.00815.88
7.1.90.0030.00715.71
7.1.80.0150.00315.65
7.1.70.0120.00015.95
7.1.60.0090.00015.65
7.1.50.0030.01015.90
7.1.40.0090.00315.80
7.1.30.0090.00015.59
7.1.20.0110.00015.63
7.1.10.0000.01415.43
7.1.00.0060.00915.41
7.0.330.0200.01114.28
7.0.320.0080.00315.39
7.0.310.0050.00415.45
7.0.300.0030.00715.54
7.0.290.0100.00315.46
7.0.280.0000.00915.36
7.0.270.0070.00415.40
7.0.260.0000.01315.37
7.0.250.0090.00315.52
7.0.240.0040.00415.29
7.0.230.0090.00315.54
7.0.220.0040.00415.51
7.0.210.0060.00915.31
7.0.200.0000.01015.55
7.0.190.0070.00715.31
7.0.180.0130.00015.48
7.0.170.0000.01615.35
7.0.160.0030.00715.13
7.0.150.0000.01215.46
7.0.140.0030.01315.48
7.0.130.0060.00315.25
7.0.120.0070.00715.38
7.0.110.0060.00915.20
7.0.100.0060.00615.53
7.0.90.0110.00015.37
7.0.80.0060.00615.32
7.0.70.0100.00015.45
7.0.60.0040.00415.48
7.0.50.0070.00715.59
7.0.40.0120.00013.12
7.0.30.0080.00413.44
7.0.20.0030.01313.50
7.0.10.0030.01213.23
7.0.00.0090.00613.47
5.6.400.0030.01214.45
5.6.390.0060.00914.46
5.6.380.0050.00514.14
5.6.370.0120.00314.27
5.6.360.0100.00314.49
5.6.350.0030.00614.32
5.6.340.0000.01014.14
5.6.330.0060.00614.41
5.6.320.0070.00714.45
5.6.310.0070.00314.78
5.6.300.0040.01114.45
5.6.290.0060.00914.28
5.6.280.0000.01214.40
5.6.270.0060.01014.32
5.6.260.0070.00714.33
5.6.250.0060.00914.66
5.6.240.0100.00314.50
5.6.230.0070.00714.45
5.6.220.0040.00814.10
5.6.210.0140.00314.55
5.6.200.0080.00514.11
5.6.190.0000.01114.66
5.6.180.0030.00614.59
5.6.170.0060.00914.55
5.6.160.0030.01414.12
5.6.150.0070.00714.52
5.6.140.0060.00614.39
5.6.130.0060.00314.63
5.6.120.0030.00914.01
5.6.110.0050.00814.11
5.6.100.0030.01514.25
5.6.90.0030.00914.32
5.6.80.0070.01014.39
5.6.70.0040.01214.33
5.6.60.0030.01214.21
5.6.50.0060.01014.23
5.6.40.0070.00714.35
5.6.30.0030.01314.47
5.6.20.0070.00414.59
5.6.10.0060.00914.50
5.6.00.0000.01214.15

preferences:
67.07 ms | 400 KiB | 5 Q