3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace One { trait foo { static $bar = []; public static function a() { } } } namespace Two { use One\foo as OneFoo; trait foo { use OneFoo; public static function a() { $bar[] = 'qux'; } } } namespace Three { class qux { use \One\foo; public static function a() { \Two\bat::a(); } } class bing extends qux { use \Two\foo; } } namespace { \Three\bing::a(); }

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.01116.63
8.3.50.0080.00816.18
8.3.40.0070.00718.43
8.3.30.0070.00718.54
8.3.20.0000.00720.34
8.3.10.0070.00023.61
8.3.00.0080.00022.43
8.2.180.0040.01116.63
8.2.170.0110.00422.96
8.2.160.0070.01322.30
8.2.150.0040.00424.18
8.2.140.0080.00624.66
8.2.130.0000.00826.16
8.2.120.0040.00417.63
8.2.110.0090.00922.25
8.2.100.0120.00017.63
8.2.90.0050.00319.05
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0080.00021.17
8.2.30.0030.00619.88
8.2.20.0000.00817.75
8.2.10.0070.00017.94
8.2.00.0000.00817.99
8.1.280.0130.00725.92
8.1.270.0040.00420.17
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0090.00023.92
8.1.230.0090.00317.42
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0000.00917.25
8.1.190.0000.00817.23
8.1.180.0000.00819.44
8.1.170.0030.00518.65
8.1.160.0040.00422.02
8.1.150.0040.00418.79
8.1.140.0040.00417.36
8.1.130.0050.00217.66
8.1.120.0030.00317.46
8.1.110.0000.00817.34
8.1.100.0040.00417.40
8.1.90.0070.00417.40
8.1.80.0080.00017.45
8.1.70.0040.00417.36
8.1.60.0000.00817.46
8.1.50.0000.00817.40
8.1.40.0040.00417.50
8.1.30.0090.00017.61
8.1.20.0080.00017.66
8.1.10.0050.00317.48
8.1.00.0050.00217.34
8.0.300.0090.00018.77
8.0.290.0040.00416.63
8.0.280.0000.00718.44
8.0.270.0030.00316.76
8.0.260.0020.00517.18
8.0.250.0030.00316.86
8.0.240.0000.00716.83
8.0.230.0040.00417.01
8.0.220.0030.00316.91
8.0.210.0030.00316.91
8.0.200.0030.00316.96
8.0.190.0030.00516.89
8.0.180.0000.00716.94
8.0.170.0070.00016.74
8.0.160.0000.00716.91
8.0.150.0000.00716.86
8.0.140.0030.00516.86
8.0.130.0000.00713.28
8.0.120.0000.00816.88
8.0.110.0040.00416.96
8.0.100.0000.00716.79
8.0.90.0030.00316.75
8.0.80.0110.00416.89
8.0.70.0040.00416.78
8.0.60.0050.00216.88
8.0.50.0000.00716.79
8.0.30.0080.01117.17
8.0.20.0120.01017.40
8.0.10.0040.00416.81
8.0.00.0090.01016.70
7.4.330.0000.00515.08
7.4.320.0030.00316.55
7.4.300.0030.00316.49
7.4.290.0030.00616.43
7.4.280.0040.00416.52
7.4.270.0030.00316.35
7.4.260.0020.00516.46
7.4.250.0000.00716.41
7.4.240.0080.00016.55
7.4.230.0000.00716.52
7.4.220.0030.01616.37
7.4.210.0100.00716.57
7.4.200.0070.00016.52
7.4.150.0070.01017.40
7.4.140.0140.01317.86
7.4.130.0040.01716.52
7.4.120.0090.00816.48
7.4.110.0040.01316.51
7.4.100.0130.01016.25
7.4.90.0040.01416.52
7.4.80.0080.01419.39
7.4.70.0050.01116.45
7.4.60.0100.00716.55
7.4.50.0040.00416.36
7.4.40.0040.01216.41
7.4.30.0090.01216.52
7.4.00.0060.00914.95
7.3.330.0050.00013.35
7.3.320.0030.00313.38
7.3.310.0000.00716.17
7.3.300.0060.00016.30
7.3.290.0070.00716.30
7.3.280.0110.00616.30
7.3.270.0160.00717.40
7.3.260.0030.01316.29
7.3.250.0100.00816.35
7.3.240.0120.00616.59
7.3.230.0080.01016.47
7.3.210.0030.01316.47
7.3.200.0140.00716.27
7.3.190.0090.01216.55
7.3.180.0000.02116.29
7.3.170.0030.01316.27
7.3.160.0100.01016.45
7.2.330.0110.00816.39
7.2.320.0180.00016.73
7.2.310.0050.01416.53
7.2.300.0030.01316.29
7.2.290.0060.01616.57
7.2.60.0110.00416.79
7.2.00.0030.01419.07
7.1.200.0030.00615.78
7.1.100.0100.00717.95
7.1.70.0040.00416.96
7.1.60.0110.01419.18
7.1.50.0060.01616.79
7.1.00.0070.07322.30
7.0.200.0080.00416.82
7.0.60.0030.05319.82
7.0.50.0070.04017.86
7.0.40.0070.04020.12
7.0.30.0270.05720.27
7.0.20.0300.04720.19
7.0.10.0070.08720.26
7.0.00.0100.04720.32
5.6.280.0070.07020.82
5.6.210.0100.06720.65
5.6.200.0100.03718.17
5.6.190.0000.09020.61
5.6.180.0230.04020.61
5.6.170.0170.06020.41
5.6.160.0130.06320.50
5.6.150.0030.03718.18
5.6.140.0170.03318.18
5.6.130.0070.08318.28
5.6.120.0030.04721.14
5.6.110.0200.07321.14
5.6.100.0070.08721.02
5.6.90.0030.05321.08
5.6.80.0170.06320.38
5.6.70.3500.03020.41
5.5.350.0100.05720.32
5.5.340.0100.05318.07
5.5.330.0100.08020.28
5.5.320.0300.07720.31
5.5.310.0270.08320.35
5.5.300.0000.04718.04
5.5.290.0130.07318.03
5.5.280.0070.07020.80
5.5.270.0070.04020.80
5.5.260.0130.07720.66
5.5.250.0170.07020.72
5.5.240.0270.06320.13
5.4.450.0130.07319.22
5.4.440.0330.04319.54
5.4.430.0130.05719.45
5.4.420.0200.07318.97
5.4.410.0200.07319.07
5.4.400.0230.06719.13
5.4.390.0200.04319.37
5.4.380.0200.04719.05
5.4.370.0170.05719.30
5.4.360.0270.04719.16
5.4.350.0330.03719.06
5.4.340.0170.06319.01
5.4.320.0170.06019.30
5.4.310.0430.04019.29
5.4.300.0270.04318.83
5.4.290.0200.06719.14
5.4.280.0330.06018.87
5.4.270.0330.06319.21
5.4.260.0130.05719.01
5.4.250.0230.05318.83
5.4.240.0400.05719.12
5.4.230.0100.07319.05
5.4.220.0370.04319.13
5.4.210.0300.04319.13
5.4.200.0200.06016.82
5.4.190.0130.05718.97
5.4.180.0170.05019.14
5.4.170.0300.06019.10
5.4.160.0170.06019.01
5.4.150.0230.06019.33
5.4.140.0200.04716.39
5.4.130.0100.05716.36
5.4.120.0130.05316.44
5.4.110.0270.04316.60
5.4.100.0130.05716.55
5.4.90.0230.04716.59
5.4.80.0230.06016.53
5.4.70.0300.04316.51
5.4.60.0370.04016.43
5.4.50.0000.06316.53
5.4.40.0000.06016.45
5.4.30.0030.04016.22
5.4.20.0400.06016.16

preferences:
46.53 ms | 400 KiB | 5 Q