3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Globock { trait Test { function toTest() { return 'toTest mock'; } } } namespace Acme { class Foo { public function hello() { echo toTest(); } } } namespace Acme\Test { class FooTest { public function helloTest() { echo toTest(); } } } namespace { function toTest() { return 'toTest'; } $a = new Acme\Foo(); echo $a->hello(); $b = new Acme\Test\FooTest(); $b->helloTest(); }

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.00316.63
8.3.50.0120.00322.74
8.3.40.0110.00318.84
8.3.30.0160.00619.09
8.3.20.0040.00420.15
8.3.10.0070.00021.92
8.3.00.0040.00419.66
8.2.180.0110.00716.63
8.2.170.0100.00722.96
8.2.160.0070.00720.38
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0110.00726.16
8.2.120.0040.00420.96
8.2.110.0090.00022.07
8.2.100.0060.00617.78
8.2.90.0050.00219.17
8.2.80.0080.00017.97
8.2.70.0070.00317.63
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0030.00518.09
8.2.30.0030.00618.07
8.2.20.0050.00217.73
8.2.10.0070.00017.97
8.2.00.0070.00017.64
8.1.280.0030.01025.92
8.1.270.0040.00423.84
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0100.00023.75
8.1.230.0070.00319.05
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0040.00418.53
8.1.160.0040.00421.95
8.1.150.0080.00018.71
8.1.140.0070.00017.30
8.1.130.0030.00517.38
8.1.120.0040.00417.29
8.1.110.0040.00417.37
8.1.100.0040.00417.40
8.1.90.0070.00017.31
8.1.80.0070.00017.43
8.1.70.0000.00717.27
8.1.60.0000.00817.48
8.1.50.0030.00617.43
8.1.40.0050.00317.55
8.1.30.0030.00517.57
8.1.20.0050.00217.51
8.1.10.0040.00417.55
8.1.00.0000.00817.48
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0070.00018.48
8.0.270.0030.00317.18
8.0.260.0080.00016.82
8.0.250.0000.00716.84
8.0.240.0070.00416.95
8.0.230.0080.00316.89
8.0.220.0000.00716.76
8.0.210.0040.00416.71
8.0.200.0000.00716.87
8.0.190.0040.00416.83
8.0.180.0040.00416.89
8.0.170.0000.00716.80
8.0.160.0080.00016.83
8.0.150.0070.00016.85
8.0.140.0040.00416.76
8.0.130.0000.00513.27
8.0.120.0000.00816.78
8.0.110.0070.00016.76
8.0.100.0070.00016.69
8.0.90.0000.00716.80
8.0.80.0090.00616.71
8.0.70.0000.00816.71
8.0.60.0040.00416.86
8.0.50.0000.00716.71
8.0.30.0100.01117.26
8.0.20.0110.00817.40
8.0.10.0000.00816.93
8.0.00.0150.00516.82
7.4.330.0000.00515.00
7.4.320.0000.00616.52
7.4.300.0030.00316.61
7.4.290.0030.00316.55
7.4.280.0030.00416.44
7.4.270.0050.00216.46
7.4.260.0070.00016.38
7.4.250.0040.00416.57
7.4.240.0050.00216.54
7.4.230.0030.00316.49
7.4.220.0160.00016.63
7.4.210.0090.00616.59
7.4.200.0030.00316.25
7.4.160.0120.00316.49
7.4.150.0120.00817.40
7.4.140.0100.01117.86
7.4.130.0090.00916.51
7.4.120.0090.01016.46
7.4.110.0090.01316.62
7.4.100.0100.01316.68
7.4.90.0030.01316.39
7.4.80.0110.00819.39
7.4.70.0030.01316.56
7.4.60.0060.01016.58
7.4.50.0020.00216.20
7.4.40.0100.00816.41
7.4.30.0100.01016.54
7.4.00.0000.01114.94
7.3.330.0020.00513.16
7.3.320.0020.00213.25
7.3.310.0000.00716.29
7.3.300.0030.00316.18
7.3.290.0080.00816.36
7.3.280.0040.01216.29
7.3.270.0070.01017.40
7.3.260.0030.01316.30
7.3.250.0120.00516.42
7.3.240.0070.01116.59
7.3.230.0100.01416.39
7.3.210.0070.01316.30
7.3.200.0120.01319.39
7.3.190.0090.01216.17
7.3.180.0090.01216.33
7.3.170.0080.00816.59
7.3.160.0130.00716.34
7.3.120.0000.01414.60
7.3.00.0030.01316.63
7.2.330.0070.01016.52
7.2.320.0090.00916.60
7.2.310.0090.00616.73
7.2.300.0060.01016.34
7.2.290.0030.01816.65
7.2.130.0080.00616.90
7.2.120.0070.00417.02
7.2.110.0080.00016.78
7.2.100.0030.00716.90
7.2.90.0080.00416.92
7.2.80.0030.00816.94
7.2.70.0060.00616.68
7.2.60.0040.01016.87
7.2.50.0030.01016.87
7.2.40.0070.00316.88
7.2.30.0080.00316.58
7.2.20.0070.00716.71
7.2.10.0040.01117.08
7.2.00.0080.01018.05
7.1.250.0040.00815.42
7.1.240.0030.00715.62
7.1.230.0000.00915.75
7.1.220.0090.00315.77
7.1.210.0000.00815.67
7.1.200.0010.00815.67
7.1.190.0070.00415.45
7.1.180.0030.00515.57
7.1.170.0030.01015.87
7.1.160.0030.01015.66
7.1.150.0000.01215.60
7.1.140.0040.01115.65
7.1.130.0000.01315.61
7.1.120.0040.00815.71
7.1.110.0000.01315.66
7.1.100.0070.00616.86
7.1.90.0060.00615.82
7.1.80.0080.00415.49
7.1.70.0070.00416.34
7.1.60.0080.00917.38
7.1.50.0010.01016.28
7.1.40.0110.00315.65
7.1.30.0030.01015.66
7.1.20.0030.01315.37
7.1.10.0070.00415.52
7.1.00.0030.04018.99
7.0.330.0030.00715.32
7.0.320.0050.00315.29
7.0.310.0050.00515.39
7.0.300.0000.01115.34
7.0.290.0070.00315.48
7.0.280.0060.00315.44
7.0.270.0000.01115.30
7.0.260.0090.00315.49
7.0.250.0070.00715.07
7.0.240.0000.00915.41
7.0.230.0030.00715.42
7.0.220.0110.00015.14
7.0.210.0030.00915.39
7.0.200.0050.00515.89
7.0.190.0030.01015.34
7.0.180.0090.00315.22
7.0.170.0070.00815.41
7.0.160.0030.00715.41
7.0.150.0000.01115.24
7.0.140.0040.03618.60
7.0.130.0060.00615.48
7.0.120.0070.00715.04
7.0.110.0000.01215.19
7.0.100.0090.00315.39
7.0.90.0090.00315.43
7.0.80.0000.01015.30
7.0.70.0060.00615.43
7.0.60.0070.03717.64
7.0.50.0030.02516.73
7.0.40.0110.03716.78
7.0.30.0100.02316.67
7.0.20.0230.03516.85
7.0.10.0100.02816.75
7.0.00.0080.03516.72
5.6.380.0060.00314.46
5.6.370.0050.00814.43
5.6.360.0030.01014.39
5.6.350.0000.01114.28
5.6.340.0110.00414.25
5.6.330.0080.00614.46
5.6.320.0040.01214.31
5.6.310.0070.00314.02
5.6.300.0090.00013.98
5.6.290.0060.00614.02
5.6.280.0070.03817.75
5.6.270.0080.00814.25
5.6.260.0060.00614.11
5.6.250.0120.00014.30
5.6.240.0090.00314.52
5.6.230.0070.00714.16
5.6.220.0070.00714.15
5.6.210.0080.03017.48
5.6.200.0060.04416.29
5.6.190.0050.02517.51
5.6.180.1720.02217.34
5.6.170.0170.02517.48
5.6.160.0080.04317.32
5.6.150.0070.02716.29
5.6.140.0030.02516.24
5.6.130.0070.03516.17
5.6.120.0050.02717.72
5.6.110.0060.03017.69
5.6.100.0070.03317.48
5.6.90.0050.04317.81
5.6.80.0060.04417.36
5.6.70.1650.02217.23
5.6.60.0030.00814.21
5.6.50.0040.00814.09
5.6.40.0110.00314.33
5.6.30.0000.01114.04
5.6.20.0030.00914.28
5.6.10.0070.00014.26
5.6.00.0060.00614.19
5.5.380.0000.00711.30
5.5.370.0060.00611.05
5.5.360.0060.00311.07
5.5.350.0060.02315.90
5.5.340.0070.02214.59
5.5.330.0000.04915.80
5.5.320.0080.03815.86
5.5.310.0100.03015.73
5.5.300.0070.04214.52
5.5.290.0080.04214.56
5.5.280.0070.03715.93
5.5.270.0120.03116.03
5.5.260.0080.01715.86
5.5.250.0120.02715.84
5.5.240.0020.01915.78
5.5.230.0060.00311.06
5.5.220.0080.00311.30
5.5.210.0000.00911.00
5.5.200.0030.00910.96
5.5.190.0040.00411.28
5.5.180.0000.00611.15
5.5.170.0000.00711.09
5.5.160.0110.00011.35
5.5.150.0030.01011.04
5.5.140.0090.00010.95
5.5.130.0000.00711.15
5.5.120.0030.00311.36
5.5.110.0000.01011.28
5.5.100.0090.00310.71
5.5.90.0000.00911.25
5.5.80.0060.00611.26
5.5.70.0050.00010.93
5.5.60.0030.00611.05
5.5.50.0060.00310.95
5.5.40.0030.00310.85
5.5.30.0070.00410.96
5.5.20.0040.00410.89
5.5.10.0060.00310.87
5.5.00.0030.00711.21
5.4.450.0400.03015.21
5.4.440.0380.03715.24
5.4.430.0280.03215.37
5.4.420.0170.03015.26
5.4.410.0360.03115.32
5.4.400.0170.03314.80
5.4.390.0190.02914.93
5.4.380.0030.03314.89
5.4.370.0080.02214.81
5.4.360.0020.02414.69
5.4.350.0050.02611.41
5.4.340.0060.01911.34
5.4.330.0040.00410.66
5.4.320.0020.02311.76
5.4.310.0040.02311.61
5.4.300.0040.02411.68
5.4.290.0070.02111.85
5.4.280.0040.02111.63
5.4.270.0060.02211.65
5.4.260.0060.01911.79
5.4.250.0060.02111.67
5.4.240.0040.02111.79
5.4.230.0020.02511.67
5.4.220.0030.02011.69
5.4.210.0030.02011.70
5.4.200.0040.02211.45
5.4.190.0030.02111.67
5.4.180.0080.02111.77
5.4.170.0090.02011.58
5.4.160.0020.02411.46
5.4.150.0050.01911.46
5.4.140.0050.02311.37
5.4.130.0040.02211.54
5.4.120.0050.02011.41
5.4.110.0040.02311.63
5.4.100.0070.02311.45
5.4.90.0070.02111.50
5.4.80.0070.01911.50
5.4.70.0050.01911.58
5.4.60.0070.02111.37
5.4.50.0050.01811.48
5.4.40.0040.01911.38
5.4.30.0030.02211.43
5.4.20.0030.02011.47
5.4.10.0060.01711.42
5.4.00.0050.02011.11
5.3.290.0050.02111.52
5.3.280.0090.02011.47
5.3.270.0050.02611.51
5.3.260.0060.02311.43
5.3.250.0040.02511.36
5.3.240.0040.02111.32
5.3.230.0120.01911.40
5.3.220.0110.02111.45
5.3.210.0150.02211.37
5.3.200.0150.01911.40
5.3.190.0070.02111.45
5.3.180.0080.01911.49
5.3.170.0040.02111.48
5.3.160.0030.02311.49
5.3.150.0040.02011.47
5.3.140.0030.02311.37
5.3.130.0020.02311.41
5.3.120.0070.02011.45
5.3.110.0080.01811.46
5.3.100.0070.02411.09
5.3.90.0080.02311.20
5.3.80.0060.02111.18
5.3.70.0080.02211.09
5.3.60.0080.02011.12
5.3.50.0070.01811.06
5.3.40.0070.02511.02
5.3.30.0050.01810.96
5.3.20.0060.01910.90
5.3.10.0020.02210.85
5.3.00.0030.02310.81
5.2.170.0040.0179.10
5.2.160.0030.0179.21
5.2.150.0020.0199.09
5.2.140.0050.0189.27
5.2.130.0060.0149.16
5.2.120.0040.0179.17
5.2.110.0050.0159.18
5.2.100.0020.0209.17
5.2.90.0050.0179.18
5.2.80.0020.0199.01
5.2.70.0040.0219.06
5.2.60.0080.0149.09
5.2.50.0010.0199.20
5.2.40.0040.0179.15
5.2.30.0040.0219.02
5.2.20.0020.0179.04
5.2.10.0060.0178.92
5.2.00.0060.0148.77
5.1.60.0020.0188.20
5.1.50.0040.0168.22
5.1.40.0040.0158.19
5.1.30.0030.0178.47
5.1.20.0030.0178.44
5.1.10.0030.0178.27
5.1.00.0010.0168.23
5.0.50.0040.0147.47
5.0.40.0040.0147.40
5.0.30.0040.0167.31
5.0.20.0030.0127.30
5.0.10.0030.0157.29
5.0.00.0020.0177.28
4.4.90.0020.0116.55
4.4.80.0020.0096.54
4.4.70.0030.0096.54
4.4.60.0010.0116.54
4.4.50.0000.0126.55
4.4.40.0040.0136.52
4.4.30.0010.0096.54
4.4.20.0030.0086.59
4.4.10.0060.0086.59
4.4.00.0030.0136.54
4.3.110.0030.0086.50
4.3.100.0010.0126.50
4.3.90.0030.0096.48
4.3.80.0020.0176.45
4.3.70.0040.0086.48
4.3.60.0030.0106.48
4.3.50.0040.0116.48
4.3.40.0060.0126.43
4.3.30.0020.0105.81
4.3.20.0010.0095.79
4.3.10.0030.0075.77
4.3.00.0100.0147.77

preferences:
46.97 ms | 401 KiB | 5 Q