3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Entity { class File { private $foo = 'top'; } class FileInbox { use Entity\FileInbox\File; public $file; public function setFile(File $file) { $this->file = $file; } } } namespace Entity\FileInbox { class File { private $foo = 'nested'; } } namespace Test { use Entity\FileInbox; use Entity\FileInbox\File; $fileInbox = new FileInbox(); $fileInbox->setFile(new File()); var_dump($fileInbox->file->foo); }

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.0210.00016.46
8.3.50.0090.01221.30
8.3.40.0110.00418.71
8.3.30.0090.00618.67
8.3.20.0000.00720.34
8.3.10.0030.00523.66
8.3.00.0100.00019.56
8.2.180.0110.00718.17
8.2.170.0070.00722.96
8.2.160.0070.00720.39
8.2.150.0030.00624.18
8.2.140.0150.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00317.63
8.2.110.0090.00022.25
8.2.100.0080.00417.63
8.2.90.0040.00419.26
8.2.80.0040.00417.97
8.2.70.0000.00917.50
8.2.60.0000.00817.91
8.2.50.0000.00918.07
8.2.40.0030.00619.52
8.2.30.0040.00418.00
8.2.20.0040.00417.63
8.2.10.0030.00517.92
8.2.00.0070.00018.01
8.1.280.0140.00425.92
8.1.270.0130.00719.97
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.42
8.1.230.0090.00317.42
8.1.220.0000.00717.74
8.1.210.0040.00418.77
8.1.200.0100.00017.13
8.1.190.0070.00017.23
8.1.180.0050.00318.10
8.1.170.0040.00418.46
8.1.160.0030.00522.04
8.1.150.0030.00618.68
8.1.140.0030.00617.39
8.1.130.0000.00717.60
8.1.120.0030.00417.30
8.1.110.0040.00417.46
8.1.100.0000.00717.30
8.1.90.0030.00417.30
8.1.80.0040.00417.45
8.1.70.0000.00717.31
8.1.60.0000.00817.54
8.1.50.0040.00417.43
8.1.40.0080.00017.50
8.1.30.0040.00817.49
8.1.20.0040.00417.54
8.1.10.0000.00817.32
8.1.00.0040.00417.34
8.0.300.0040.00718.77
8.0.290.0040.00416.63
8.0.280.0000.00718.40
8.0.270.0000.00717.21
8.0.260.0030.00317.20
8.0.250.0040.00416.88
8.0.240.0030.00516.91
8.0.230.0080.00016.84
8.0.220.0030.00316.77
8.0.210.0070.00016.89
8.0.200.0070.00016.89
8.0.190.0040.00416.97
8.0.180.0040.00316.80
8.0.170.0000.00816.87
8.0.160.0040.00416.97
8.0.150.0040.00416.78
8.0.140.0030.00516.88
8.0.130.0040.00413.32
8.0.120.0040.00416.93
8.0.110.0040.00416.80
8.0.100.0070.00016.74
8.0.90.0040.00416.79
8.0.80.0060.01016.92
8.0.70.0080.00016.85
8.0.60.0050.00316.79
8.0.50.0080.00016.89
8.0.30.0090.00716.96
8.0.20.0140.00917.40
8.0.10.0050.00317.08
8.0.00.0120.00416.57
7.4.330.0050.00015.08
7.4.320.0000.00616.47
7.4.300.0060.00016.30
7.4.290.0040.00416.44
7.4.280.0040.00416.39
7.4.270.0030.00616.45
7.4.260.0000.00716.33
7.4.250.0040.00416.50
7.4.240.0060.00216.42
7.4.230.0000.00716.59
7.4.220.0100.00716.53
7.4.210.0060.00816.48
7.4.200.0080.00016.61
7.4.160.0120.00316.44
7.4.150.0090.00917.40
7.4.140.0070.01117.86
7.4.130.0110.00916.61
7.4.120.0080.01016.56
7.4.110.0110.00716.29
7.4.100.0070.01416.45
7.4.90.0030.01316.41
7.4.80.0130.01019.39
7.4.70.0100.00616.54
7.4.60.0040.01416.45
7.4.50.0060.00016.22
7.4.40.0090.00916.38
7.4.30.0030.02016.34
7.4.00.0030.01314.70
7.3.330.0060.00013.11
7.3.320.0050.00313.09
7.3.310.0050.00316.29
7.3.300.0040.00416.11
7.3.290.0000.00716.26
7.3.280.0090.01016.22
7.3.270.0110.00717.40
7.3.260.0200.00316.29
7.3.250.0080.01116.33
7.3.240.0150.00716.48
7.3.230.0100.01416.39
7.3.210.0090.00916.17
7.3.200.0100.01016.25
7.3.190.0140.00316.38
7.3.180.0100.00616.59
7.3.170.0060.00916.54
7.3.160.0170.00316.45
7.2.330.0120.00416.43
7.2.320.0140.00916.37
7.2.310.0130.01016.61
7.2.300.0140.00716.39
7.2.290.0150.00316.47
7.2.60.0090.00316.80
7.2.00.0000.01419.20
7.1.200.0090.00315.69
7.1.100.0030.01017.91
7.1.70.0000.00717.00
7.1.60.0120.01219.17
7.1.50.0070.01816.95
7.1.00.0070.07322.45
7.0.200.0040.00714.95
7.0.60.0070.06719.91
7.0.50.0070.04317.87
7.0.40.0100.05020.30
7.0.30.0630.06320.21
7.0.20.0400.07720.23
7.0.10.0070.05320.07
7.0.00.0200.07720.07
5.6.280.0000.04020.89
5.6.210.0170.03320.71
5.6.200.0030.04318.18
5.6.190.0030.04020.50
5.6.180.2870.04020.58
5.6.170.0370.07320.55
5.6.160.0130.07720.39
5.6.150.0100.07718.17
5.6.140.0000.05318.15
5.6.130.0070.08018.27
5.6.120.0100.07720.98
5.6.110.0070.07720.98
5.6.100.0130.08321.13
5.6.90.0030.04321.12
5.6.80.0000.04320.43
5.6.70.4730.04720.36
5.5.350.0070.07320.43
5.5.340.0000.04018.08
5.5.330.0100.05720.41
5.5.320.0170.04020.34
5.5.310.0230.07720.34
5.5.300.0000.05017.92
5.5.290.0130.07317.97
5.5.280.0030.05020.88
5.5.270.0100.07720.89
5.5.260.0100.06720.88
5.5.250.0070.06720.70
5.5.240.0230.05320.16
5.4.450.0870.06019.52
5.4.440.0900.05719.27
5.4.430.0970.06019.05
5.4.420.1100.04719.44
5.4.410.0930.05319.30
5.4.400.0900.05718.95
5.4.390.0970.05018.94
5.4.380.0670.06019.20
5.4.370.0700.05319.16
5.4.360.0770.06319.11
5.4.350.0730.05318.95
5.4.340.0930.05019.10
5.4.320.0830.05718.78
5.4.310.0830.04019.13
5.4.300.0870.05718.95
5.4.290.0930.04719.14
5.4.280.0700.06319.09
5.4.270.0730.05718.73
5.4.260.0700.05718.95
5.4.250.1030.03718.94
5.4.240.0730.05018.77
5.4.230.0870.05318.89
5.4.220.0800.04718.93
5.4.210.0670.06319.17
5.4.200.0800.04319.18
5.4.190.0700.06019.12
5.4.180.0700.05319.17
5.4.170.0870.07019.17
5.4.160.1000.04718.92
5.4.150.0730.06018.88
5.4.140.0870.05316.40
5.4.130.0800.04316.38
5.4.120.0770.05316.54
5.4.110.0670.05316.42
5.4.100.0900.06016.24
5.4.90.0600.05716.59
5.4.80.0830.04016.30
5.4.70.0230.03716.40
5.4.60.0300.05016.25
5.4.50.0030.03016.22
5.4.40.0300.05716.43
5.4.30.0000.04716.48
5.4.20.0300.04716.52

preferences:
36.98 ms | 401 KiB | 5 Q